mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 06:39:49 +03:00
1 sec status bar update rate is volt/percent is enabled
This commit is contained in:
49
ui/main.c
49
ui/main.c
@ -447,34 +447,29 @@ void UI_DisplayMain(void)
|
||||
UI_PrintStringSmall("SCR", LCD_WIDTH + 106, 0, Line + 1);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DTMF_DECODER
|
||||
if (center_line_is_free)
|
||||
{
|
||||
if (gDTMF_ReceivedSaved[0] >= 32)
|
||||
{ // show live DTMF decode
|
||||
UI_PrintStringSmall(gDTMF_ReceivedSaved, 8, 0, 3);
|
||||
}
|
||||
else
|
||||
#else
|
||||
if (center_line_is_free)
|
||||
{
|
||||
#endif
|
||||
if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
#ifdef ENABLE_SHOW_CHARGE_LEVEL
|
||||
const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v :
|
||||
(gBatteryVoltageAverage > gMax_bat_v) ? gMax_bat_v :
|
||||
gBatteryVoltageAverage;
|
||||
|
||||
sprintf(String, "Charge %u.%02uV %u%%",
|
||||
gBatteryVoltageAverage / 100,
|
||||
gBatteryVoltageAverage % 100,
|
||||
(100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v));
|
||||
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
#endif
|
||||
}
|
||||
if (center_line_is_free)
|
||||
{
|
||||
if (gSetting_live_DTMF_decoder && gDTMF_ReceivedSaved[0] >= 32)
|
||||
{ // show live DTMF decode
|
||||
UI_PrintStringSmall(gDTMF_ReceivedSaved, 8, 0, 3);
|
||||
}
|
||||
else
|
||||
if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
#ifdef ENABLE_SHOW_CHARGE_LEVEL
|
||||
const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v :
|
||||
(gBatteryVoltageAverage > gMax_bat_v) ? gMax_bat_v :
|
||||
gBatteryVoltageAverage;
|
||||
|
||||
sprintf(String, "Charge %u.%02uV %u%%",
|
||||
gBatteryVoltageAverage / 100,
|
||||
gBatteryVoltageAverage % 100,
|
||||
(100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v));
|
||||
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
|
@ -90,6 +90,7 @@ const char MenuList[][7] =
|
||||
"PTT-ID",
|
||||
"D-DCD",
|
||||
"D-LIST",
|
||||
"D-LIVE", // live DTMF decoder
|
||||
"PONMSG",
|
||||
"ROGER",
|
||||
"BATVOL", // was "VOL"
|
||||
@ -427,6 +428,7 @@ void UI_DisplayMenu(void)
|
||||
case MENU_STE:
|
||||
case MENU_D_ST:
|
||||
case MENU_D_DCD:
|
||||
case MENU_D_LIVE_DEC:
|
||||
#ifdef ENABLE_NOAA
|
||||
case MENU_NOAA_S:
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user