diff --git a/flight/pios/common/pios_debuglog.c b/flight/pios/common/pios_debuglog.c index 05681fc79..4ac83a757 100644 --- a/flight/pios/common/pios_debuglog.c +++ b/flight/pios/common/pios_debuglog.c @@ -104,6 +104,10 @@ void PIOS_DEBUGLOG_Initialize() */ void PIOS_DEBUGLOG_Enable(uint8_t enabled) { + // increase the flight num as soon as logging is disabled + if (!logging_enabled && enabled) { + flightnum++; + } logging_enabled = enabled; }