From 3ef83389e9053b93d2a57d867de74e140185c2b1 Mon Sep 17 00:00:00 2001 From: Nicholas Sherlock Date: Tue, 30 Dec 2014 20:12:30 +1300 Subject: [PATCH] Fix bug intoduced in 0.1.6 which truncated the header in recorded logs --- src/main/blackbox/blackbox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/blackbox/blackbox.c b/src/main/blackbox/blackbox.c index 2798275e8..4f0d42260 100644 --- a/src/main/blackbox/blackbox.c +++ b/src/main/blackbox/blackbox.c @@ -1079,7 +1079,7 @@ static int blackboxWriteSysinfo(int xmitIndex) break; case 6: blackboxPrintf("H P interval:%d/%d\n", masterConfig.blackbox_rate_num, masterConfig.blackbox_rate_denom); - break; + break; case 7: blackboxPrintf("H rcRate:%d\n", masterConfig.controlRateProfiles[masterConfig.current_profile_index].rcRate8); break; @@ -1187,7 +1187,8 @@ void handleBlackbox(void) //On entry of this state, headerXmitIndex is 0 headerXmitIndex = blackboxWriteSysinfo(headerXmitIndex); - blackboxSetState(BLACKBOX_STATE_PRERUN); + if (headerXmitIndex == -1) + blackboxSetState(BLACKBOX_STATE_PRERUN); break; case BLACKBOX_STATE_PRERUN: blackboxPlaySyncBeep();