aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-09-07 11:12:56 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-09-07 11:12:56 +0200
commit5111249eb8356b7b05f216b3cf7e6172f659c5c3 (patch)
treee9b6968f1454a122000d6a7b812e527b90fc4c6b /src/modules
parentd74bea57ac9f47b56e7f8b1ba592489a94a969f0 (diff)
parentbdabcd9627b216aa64027657fe9295725804e6de (diff)
downloadpx4-firmware-5111249eb8356b7b05f216b3cf7e6172f659c5c3.tar.gz
px4-firmware-5111249eb8356b7b05f216b3cf7e6172f659c5c3.tar.bz2
px4-firmware-5111249eb8356b7b05f216b3cf7e6172f659c5c3.zip
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_l1
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/sdlog2/sdlog2_messages.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/sdlog2/sdlog2_messages.h b/src/modules/sdlog2/sdlog2_messages.h
index 4eeb65a87..1343bb3d0 100644
--- a/src/modules/sdlog2/sdlog2_messages.h
+++ b/src/modules/sdlog2/sdlog2_messages.h
@@ -250,8 +250,26 @@ struct log_GVSP_s {
float vz;
};
+/* --- FWRV - FIRMWARE REVISION --- */
+#define LOG_FWRV_MSG 20
+struct log_FWRV_s {
+ char fw_revision[64];
+};
+
#pragma pack(pop)
+
+/*
+ GIT_VERSION is defined at build time via a Makefile call to the
+ git command line. We create a fake log message format for
+ the firmware revision "FWRV" that is written to every log
+ header. This makes it easier to determine which version
+ of the firmware was running when a log was created.
+ */
+#define FREEZE_STR(s) #s
+#define STRINGIFY(s) FREEZE_STR(s)
+#define FW_VERSION_STR STRINGIFY(GIT_VERSION)
+
/* construct list of all message formats */
static const struct log_format_s log_formats[] = {
@@ -274,6 +292,7 @@ static const struct log_format_s log_formats[] = {
LOG_FORMAT(GPSP, "BLLfffbBffff", "AltRel,Lat,Lon,Alt,Yaw,LoiterR,LoiterDir,NavCmd,P1,P2,P3,P4"),
LOG_FORMAT(ESC, "HBBBHHHHHHfH", "Counter,NumESC,Conn,N,Ver,Adr,Volt,Amp,RPM,Temp,SetP,SetPRAW"),
LOG_FORMAT(GVSP, "fff", "VX,VY,VZ"),
+ LOG_FORMAT(FWRV,"Z",FW_VERSION_STR),
};
static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s);