mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Merge pull request #4550 from mikeller/hide_rtc_date_time_if_undefined
Hide RTC date/time in CLI 'status' if it is undefined.
This commit is contained in:
commit
c14da43e8e
1 changed files with 4 additions and 3 deletions
|
@ -2964,9 +2964,10 @@ static void cliStatus(char *cmdline)
|
|||
#ifdef USE_RTC_TIME
|
||||
char buf[FORMATTED_DATE_TIME_BUFSIZE];
|
||||
dateTime_t dt;
|
||||
rtcGetDateTime(&dt);
|
||||
dateTimeFormatLocal(buf, &dt);
|
||||
cliPrintLinef("Current Time: %s", buf);
|
||||
if (rtcGetDateTime(&dt)) {
|
||||
dateTimeFormatLocal(buf, &dt);
|
||||
cliPrintLinef("Current Time: %s", buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
cliPrintLinef("Voltage: %d * 0.1V (%dS battery - %s)", getBatteryVoltage(), getBatteryCellCount(), getBatteryStateString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue