From 991d6598efbc1dc0501465cf17add79218a56c37 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Apr 2013 09:50:42 +1000 Subject: [PATCH] Plane: log board voltage --- ArduPlane/Log.pde | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ArduPlane/Log.pde b/ArduPlane/Log.pde index d4897a38b1..3ee770b401 100644 --- a/ArduPlane/Log.pde +++ b/ArduPlane/Log.pde @@ -362,6 +362,7 @@ struct PACKED log_Current { int16_t throttle_in; int16_t battery_voltage; int16_t current_amps; + uint16_t board_voltage; float current_total; }; @@ -372,6 +373,7 @@ static void Log_Write_Current() throttle_in : g.channel_throttle.control_in, battery_voltage : (int16_t)(battery_voltage1 * 100.0), current_amps : (int16_t)(current_amps1 * 100.0), + board_voltage : board_voltage(), current_total : current_total1 }; DataFlash.WriteBlock(&pkt, sizeof(pkt)); @@ -440,7 +442,9 @@ static const struct LogStructure log_structure[] PROGMEM = { { LOG_MODE_MSG, sizeof(log_Mode), "MODE", "B", "Mode" }, { LOG_CURRENT_MSG, sizeof(log_Current), - "CURR", "hhhf", "Thr,Volt,Curr,CurrTot" }, + "CURR", "hhhHf", "Thr,Volt,Curr,Vcc,CurrTot" }, + { LOG_COMPASS_MSG, sizeof(log_Compass), + "MAG", "hhhhhhhhh", "MagX,MagY,MagZ,OfsX,OfsY,OfsZ,MOfsX,MOfsY,MOfsZ" }, }; // Read the DataFlash.log memory : Packet Parser