From 4e3949604648834b8d82eb8f519628a737a68081 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 6 Sep 2017 10:53:00 +1000 Subject: [PATCH] Tracker: support for units on fields --- AntennaTracker/Log.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AntennaTracker/Log.cpp b/AntennaTracker/Log.cpp index 36dababfd7..587c00ed17 100644 --- a/AntennaTracker/Log.cpp +++ b/AntennaTracker/Log.cpp @@ -70,12 +70,15 @@ void Tracker::Log_Write_Vehicle_Pos(int32_t lat, int32_t lng, int32_t alt, const DataFlash.WriteBlock(&pkt, sizeof(pkt)); } +// type and unit information can be found in +// libraries/DataFlash/Logstructure.h; search for "log_Units" for +// units and "Format characters" for field type information const struct LogStructure Tracker::log_structure[] = { LOG_COMMON_STRUCTURES, {LOG_V_BAR_MSG, sizeof(log_Vehicle_Baro), - "VBAR", "Qff", "TimeUS,Press,AltDiff" }, + "VBAR", "Qff", "TimeUS,Press,AltDiff", "sPm", "F00" }, {LOG_V_POS_MSG, sizeof(log_Vehicle_Pos), - "VPOS", "QLLefff", "TimeUS,Lat,Lng,Alt,VelX,VelY,VelZ" } + "VPOS", "QLLefff", "TimeUS,Lat,Lng,Alt,VelX,VelY,VelZ", "sddmnnn", "FGGB000" } }; void Tracker::Log_Write_Vehicle_Startup_Messages()