mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
sdlog2: fix PARAM name truncation
if a parameter name was 16 characters long (which is valid), the last character got truncated due to 0-terminated string. This raises the param name to 64 chars, which is quite wasteful, but there is no other length in between.
This commit is contained in:
@@ -659,7 +659,7 @@ struct log_VER_s {
|
|||||||
/* --- PARM - PARAMETER --- */
|
/* --- PARM - PARAMETER --- */
|
||||||
#define LOG_PARM_MSG 131
|
#define LOG_PARM_MSG 131
|
||||||
struct log_PARM_s {
|
struct log_PARM_s {
|
||||||
char name[16];
|
char name[64];
|
||||||
float value;
|
float value;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
@@ -736,7 +736,7 @@ static const struct log_format_s log_formats[] = {
|
|||||||
/* FMT: don't write format of format message, it's useless */
|
/* FMT: don't write format of format message, it's useless */
|
||||||
LOG_FORMAT(TIME, "Q", "StartTime"),
|
LOG_FORMAT(TIME, "Q", "StartTime"),
|
||||||
LOG_FORMAT(VER, "NZ", "Arch,FwGit"),
|
LOG_FORMAT(VER, "NZ", "Arch,FwGit"),
|
||||||
LOG_FORMAT(PARM, "Nf", "Name,Value")
|
LOG_FORMAT(PARM, "Zf", "Name,Value")
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned log_formats_num = sizeof(log_formats) / sizeof(log_formats[0]);
|
static const unsigned log_formats_num = sizeof(log_formats) / sizeof(log_formats[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user