From 57c6f62590bb37b0cf641f631d581c5e6db58cbc Mon Sep 17 00:00:00 2001 From: Gary Keeble Date: Sat, 16 Apr 2016 16:00:33 +0100 Subject: [PATCH] Added rate fields to log header Add Roll/Pitch/Yaw Rates and Expo to log header, add loop time to header --- src/main/blackbox/blackbox.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/blackbox/blackbox.c b/src/main/blackbox/blackbox.c index 06c6e34ae..23f24411e 100644 --- a/src/main/blackbox/blackbox.c +++ b/src/main/blackbox/blackbox.c @@ -323,6 +323,9 @@ extern uint32_t currentTime; //From rx.c: extern uint16_t rssi; +//From gyro.c +extern uint32_t targetLooptime; + static BlackboxState blackboxState = BLACKBOX_STATE_DISABLED; static uint32_t blackboxLastArmingBeep = 0; @@ -1166,6 +1169,21 @@ static bool blackboxWriteSysinfo() blackboxPrintfHeaderLine("currentMeter:%d,%d", masterConfig.batteryConfig.currentMeterOffset, masterConfig.batteryConfig.currentMeterScale); } break; + case 13: + blackboxPrintfHeaderLine("rcExpo:%d", masterConfig.profile[masterConfig.current_profile_index].controlRateProfile[masterConfig.profile[masterConfig.current_profile_index].activeRateProfile].rcExpo8); + break; + case 14: + blackboxPrintfHeaderLine("rcYawExpo:%d", masterConfig.profile[masterConfig.current_profile_index].controlRateProfile[masterConfig.profile[masterConfig.current_profile_index].activeRateProfile].rcYawExpo8); + break; + case 15: + blackboxPrintfHeaderLine("rates:%d,%d,%d", + masterConfig.profile[masterConfig.current_profile_index].controlRateProfile[masterConfig.profile[masterConfig.current_profile_index].activeRateProfile].rates[0], + masterConfig.profile[masterConfig.current_profile_index].controlRateProfile[masterConfig.profile[masterConfig.current_profile_index].activeRateProfile].rates[1], + masterConfig.profile[masterConfig.current_profile_index].controlRateProfile[masterConfig.profile[masterConfig.current_profile_index].activeRateProfile].rates[2]); + break; + case 16: + blackboxPrintfHeaderLine("looptime:%d", targetLooptime); + break; default: return true; }