mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
Fix frequency display position
This commit is contained in:
18
ui/status.c
18
ui/status.c
@ -122,17 +122,21 @@ void UI_DisplayStatus(const bool test_display)
|
||||
UI_PrintStringSmallBuffer(s, line);
|
||||
//line += 8 * 4;
|
||||
#elif defined(ENABLE_STATUSBAR_PERCENTAGE)
|
||||
char s[6];
|
||||
const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v : gBatteryVoltageAverage;
|
||||
sprintf(s, "%u%%", (100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v));
|
||||
UI_PrintStringSmallBuffer(s, line);
|
||||
const uint16_t volts = (gBatteryVoltageAverage < gMin_bat_v) ? gMin_bat_v : gBatteryVoltageAverage;
|
||||
const uint16_t percent = (100 * (volts - gMin_bat_v)) / (gMax_bat_v - gMin_bat_v);
|
||||
const unsigned int x = (percent >= 100) ? 0 : 4; // move to the right a bit
|
||||
char s[8];
|
||||
sprintf(s, "%u%%", percent);
|
||||
UI_PrintStringSmallBuffer(s, line + x);
|
||||
//line += 8 * 4;
|
||||
#endif
|
||||
}
|
||||
// else
|
||||
// line += sizeof(BITMAP_F_Key);
|
||||
|
||||
line = gStatusLine + LCD_WIDTH - sizeof(BITMAP_BatteryLevel5) - sizeof(BITMAP_USB_C); // point to right side of the screen
|
||||
|
||||
|
||||
|
||||
// move to right side of the screen
|
||||
line = gStatusLine + LCD_WIDTH - sizeof(BITMAP_BatteryLevel5) - sizeof(BITMAP_USB_C);
|
||||
|
||||
// USB-C charge indicator
|
||||
if (gChargingWithTypeC || test_display)
|
||||
|
Reference in New Issue
Block a user