1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Show blackbox log number in OSD only when available.

This commit is contained in:
mikeller 2019-11-02 13:50:36 +13:00
parent 086c75b3bf
commit 53955a4a6b
6 changed files with 27 additions and 14 deletions

View file

@ -923,7 +923,12 @@ static void osdElementLogStatus(osdElementParms_t *element)
} else if (isBlackboxDeviceFull()) {
tfp_sprintf(element->buff, "%c>", SYM_BBLOG);
} else {
tfp_sprintf(element->buff, "%c%d", SYM_BBLOG, blackboxGetLogNumber());
int32_t logNumber = blackboxGetLogNumber();
if (logNumber >= 0) {
tfp_sprintf(element->buff, "%c%d", SYM_BBLOG, logNumber);
} else {
tfp_sprintf(element->buff, "%c", SYM_BBLOG);
}
}
}
}