1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-1395 - Reset log num when changing flight num. fix flight num update logic

This commit is contained in:
Alessio Morale 2014-07-09 23:05:38 +02:00
parent e53be4f8ec
commit 6c38eda192

View File

@ -105,8 +105,9 @@ 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) {
if (logging_enabled && !enabled) {
flightnum++;
lognum = 0;
}
logging_enabled = enabled;
}