1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00

Ensure battery status strings are stored in the flash.

This commit is contained in:
Dominic Clifton 2015-08-04 03:10:34 +01:00
parent 7202ad7524
commit 463437fb45
2 changed files with 2 additions and 2 deletions

View file

@ -2043,7 +2043,7 @@ static void cliStatus(char *cmdline)
UNUSED(cmdline); UNUSED(cmdline);
printf("System Uptime: %d seconds, Voltage: %d * 0.1V (%dS battery - %s)\r\n", printf("System Uptime: %d seconds, Voltage: %d * 0.1V (%dS battery - %s)\r\n",
millis() / 1000, vbat, batteryCellCount,getBatteryStateString( )); millis() / 1000, vbat, batteryCellCount, getBatteryStateString());
printf("CPU Clock=%dMHz", (SystemCoreClock / 1000000)); printf("CPU Clock=%dMHz", (SystemCoreClock / 1000000));

View file

@ -146,7 +146,7 @@ batteryState_e getBatteryState(void)
return batteryState; return batteryState;
} }
const char * batteryStateStrings[] = {"OK", "WARNING", "CRITICAL", "NOT PRESENT"}; const char * const batteryStateStrings[] = {"OK", "WARNING", "CRITICAL", "NOT PRESENT"};
const char * getBatteryStateString(void) const char * getBatteryStateString(void)
{ {