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
|
@ -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…
Reference in New Issue