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

Added TX Enable hidden menu item

This commit is contained in:
OneOfEleven
2023-09-19 09:16:57 +01:00
parent 7e7439bcb6
commit aeb22b7028
15 changed files with 51 additions and 23 deletions

View File

@ -104,15 +104,16 @@ const char MenuList[][7] =
// enabled if pressing PTT and upper side button at power-on.
"F-LOCK",
"T-200", // was "200TX"
"T-350", // was "350TX"
"T-500", // was "500TX"
"TX-200", // was "200TX"
"TX-350", // was "350TX"
"TX-500", // was "500TX"
"350-EN", // was "350EN"
"SCR-EN", // was "SCREN"
"TX-EN", // enable TX
"F-CALI", // reference xtal calibration
"" // end of list
"" // end of list - DO NOT DELETE THIS !
};
const char gSubMenu_TXP[3][5] =
@ -434,6 +435,7 @@ void UI_DisplayMenu(void)
case MENU_500TX:
case MENU_350EN:
case MENU_SCREN:
case MENU_TX_EN:
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
break;

View File

@ -83,7 +83,7 @@ enum
MENU_DEL_CH,
MENU_RESET,
// items after here are hidden
// items after here are normally hidden
MENU_F_LOCK,
MENU_200TX,
@ -92,6 +92,7 @@ enum
MENU_350EN,
MENU_SCREN,
MENU_TX_EN, // enable TX
MENU_F_CALI // reference xtal calibration
};

View File

@ -114,29 +114,32 @@ void UI_DisplayStatus(const bool test_display)
}
else
if (!gChargingWithTypeC)
{ // battery voltage/percentage
{ // battery voltage or percentage
#if defined(ENABLE_STATUSBAR_VOLTAGE)
#ifdef ENABLE_STATUSBAR_VOLTAGE
char s[6];
sprintf(s, "%u.%02u", gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100);
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 > gMax_bat_v) ? gMax_bat_v :
gBatteryVoltageAverage;
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);
//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
// USB-C charge indicator
if (gChargingWithTypeC || test_display)
memmove(line, BITMAP_USB_C, sizeof(BITMAP_USB_C));
// line += sizeof(BITMAP_USB_C);
line += sizeof(BITMAP_USB_C);
// BATTERY LEVEL indicator
line = gStatusLine + LCD_WIDTH - sizeof(BITMAP_BatteryLevel5); // point to the far right side of the screen
if (gBatteryDisplayLevel >= 5 || test_display)
memmove(line, BITMAP_BatteryLevel5, sizeof(BITMAP_BatteryLevel5));
else