mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
Add tenths of a second OSD timer precision option
Currently the timers support full second and hundredth of a second display precision. This adds a tenth of a second option.
This commit is contained in:
parent
6b5dafb677
commit
d62a4f4b18
3 changed files with 11 additions and 1 deletions
|
@ -286,6 +286,12 @@ void osdFormatTime(char * buff, osd_timer_precision_e precision, timeUs_t time)
|
|||
tfp_sprintf(buff, "%02d:%02d.%02d", minutes, seconds, hundredths);
|
||||
break;
|
||||
}
|
||||
case OSD_TIMER_PREC_TENTHS:
|
||||
{
|
||||
const int tenths = (time / 100000) % 10;
|
||||
tfp_sprintf(buff, "%02d:%02d.%01d", minutes, seconds, tenths);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue