aboutsummaryrefslogtreecommitdiff
path: root/src/modules/sdlog2/sdlog2_format.h
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-05-26 00:14:10 +0400
committerAnton Babushkin <anton.babushkin@me.com>2013-05-26 00:14:10 +0400
commit691dc8eefd835c437251e544f74f126bb883869c (patch)
treeb54e050144008694ee0efc971eaa5b5436d64b7f /src/modules/sdlog2/sdlog2_format.h
parente2113526043f82700c2cff5d16d9e3a4dee089c7 (diff)
downloadpx4-firmware-691dc8eefd835c437251e544f74f126bb883869c.tar.gz
px4-firmware-691dc8eefd835c437251e544f74f126bb883869c.tar.bz2
px4-firmware-691dc8eefd835c437251e544f74f126bb883869c.zip
sdlog2 strick packing fixed, length bug fixed, "sdlog2_dump.py" debug tool added
Diffstat (limited to 'src/modules/sdlog2/sdlog2_format.h')
-rw-r--r--src/modules/sdlog2/sdlog2_format.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/sdlog2/sdlog2_format.h b/src/modules/sdlog2/sdlog2_format.h
index f5347a7bd..bbf8b6f12 100644
--- a/src/modules/sdlog2/sdlog2_format.h
+++ b/src/modules/sdlog2/sdlog2_format.h
@@ -77,7 +77,7 @@ Format characters in the format string for binary log messages
struct log_format_s {
uint8_t type;
- uint8_t length;
+ uint8_t length; // full packet length including header
char name[4];
char format[16];
char labels[64];
@@ -85,13 +85,13 @@ struct log_format_s {
#define LOG_FORMAT(_name, _format, _labels) { \
.type = LOG_##_name##_MSG, \
- .length = sizeof(struct log_##_name##_s) + 8, \
- .name = #_name, \
- .format = _format, \
- .labels = _labels \
+ .length = sizeof(struct log_##_name##_s) + LOG_PACKET_HEADER_LEN, \
+ .name = #_name, \
+ .format = _format, \
+ .labels = _labels \
}
-#define LOG_FORMAT_MSG 128
+#define LOG_FORMAT_MSG 0x80
#define LOG_PACKET_SIZE(_name) LOG_PACKET_HEADER_LEN + sizeof(log_msg.body.log_##_name)