1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +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

@ -670,10 +670,13 @@ static bool osdDisplayStat(int statistic, uint8_t displayRow)
break;
case OSD_STAT_BLACKBOX_NUMBER:
if (blackboxConfig()->device && blackboxConfig()->device != BLACKBOX_DEVICE_SERIAL) {
itoa(blackboxGetLogNumber(), buff, 10);
osdDisplayStatisticLabel(displayRow, "BB LOG NUM", buff);
return true;
{
int32_t logNumber = blackboxGetLogNumber();
if (logNumber >= 0) {
itoa(logNumber, buff, 10);
osdDisplayStatisticLabel(displayRow, "BB LOG NUM", buff);
return true;
}
}
break;
#endif