0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 06:58:39 +03:00

Fixed button/ptt being ignored, re-wrote a keyboard function as well.

This commit is contained in:
OneOfEleven
2023-10-09 22:49:29 +01:00
parent fe77e62fe0
commit c76891be6d
19 changed files with 387 additions and 359 deletions

View File

@ -164,21 +164,21 @@ void UI_DisplayStatus(const bool test_display)
x1 = x;
}
else
if (g_f_key_was_pressed)
if (g_fkey_pressed)
{
memmove(line + x, BITMAP_F_KEY, sizeof(BITMAP_F_KEY));
x += sizeof(BITMAP_F_KEY);
x1 = x;
}
{ // battery voltage or percentage
{ // battery voltage or percentage text
char s[8];
unsigned int space_needed;
unsigned int x2 = LCD_WIDTH - sizeof(BITMAP_BATTERY_LEVEL) - 3;
if (g_charging_with_type_c)
x2 -= sizeof(BITMAP_USB_C); // the radio is on charge
x2 -= sizeof(BITMAP_USB_C); // the radio is on USB charge
switch (g_setting_battery_text)
{
@ -192,9 +192,7 @@ void UI_DisplayStatus(const bool test_display)
sprintf(s, "%u.%02uV", voltage / 100, voltage % 100);
space_needed = (7 * strlen(s));
if (x2 >= (x1 + space_needed))
{
UI_PrintStringSmallBuffer(s, line + x2 - space_needed);
}
break;
}