mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
Added TX Enable hidden menu item
This commit is contained in:
parent
7e7439bcb6
commit
aeb22b7028
@ -47,7 +47,7 @@ ENABLE_STATUSBAR_PERCENTAGE := 1 show the battery percentage on the top
|
||||
* Better backlight times (inc always on)
|
||||
* Nicer/cleaner big numeric font than original Quansheng big numeric font
|
||||
* Various menu re-wordings (trying to reduce 'WTH does that mean ?')
|
||||
* Extra menu items (including hidden frequency calibration)
|
||||
* Extra menu items (including hidden ones)
|
||||
* plus others
|
||||
|
||||
# Compiler
|
||||
|
10
app/menu.c
10
app/menu.c
@ -266,6 +266,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
case MENU_500TX:
|
||||
case MENU_350EN:
|
||||
case MENU_SCREN:
|
||||
case MENU_TX_EN:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
|
||||
break;
|
||||
@ -684,6 +685,11 @@ void MENU_AcceptSetting(void)
|
||||
gFlagReconfigureVfos = true;
|
||||
return;
|
||||
|
||||
case MENU_TX_EN:
|
||||
gSetting_TX_EN = gSubMenuSelection;
|
||||
gRequestSaveSettings = true;
|
||||
return;
|
||||
|
||||
case MENU_F_CALI:
|
||||
gEeprom.BK4819_XTAL_FREQ_LOW = gSubMenuSelection;
|
||||
BK4819_WriteRegister(BK4819_REG_3B, 22656 + gEeprom.BK4819_XTAL_FREQ_LOW);
|
||||
@ -1026,6 +1032,10 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gSetting_ScrambleEnable;
|
||||
break;
|
||||
|
||||
case MENU_TX_EN:
|
||||
gSubMenuSelection = gSetting_TX_EN;
|
||||
break;
|
||||
|
||||
case MENU_F_CALI:
|
||||
gSubMenuSelection = gEeprom.BK4819_XTAL_FREQ_LOW;
|
||||
break;
|
||||
|
1
board.c
1
board.c
@ -713,6 +713,7 @@ void BOARD_EEPROM_Init(void)
|
||||
gSetting_500TX = (Data[4] < 2) ? Data[4] : false;
|
||||
gSetting_350EN = (Data[5] < 2) ? Data[5] : true;
|
||||
gSetting_ScrambleEnable = (Data[6] < 2) ? Data[6] : true;
|
||||
gSetting_TX_EN = (Data[7] & (1u << 0)) ? true : false;
|
||||
|
||||
if (!gEeprom.VFO_OPEN)
|
||||
{
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -66,8 +66,11 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
||||
{
|
||||
if (Mode == BOOT_MODE_F_LOCK)
|
||||
{
|
||||
//gMenuListCount += 6; // enable the last 6 menu items
|
||||
gMenuListCount += 7; // enable the last 7 menu items
|
||||
// enable all the menu items
|
||||
gMenuListCount = 0;
|
||||
while (MenuList[gMenuListCount][0] != 0)
|
||||
gMenuListCount++;
|
||||
|
||||
gMenuCursor = MENU_350TX;
|
||||
gSubMenuSelection = gSetting_350TX;
|
||||
GUI_SelectNextDisplay(DISPLAY_MENU);
|
||||
|
3
main.c
3
main.c
@ -117,8 +117,9 @@ void Main(void)
|
||||
// count the number of menu list items
|
||||
while (MenuList[gMenuListCount][0] != 0)
|
||||
gMenuListCount++;
|
||||
// disable the N menu items
|
||||
//gMenuListCount -= 6;
|
||||
gMenuListCount -= 7;
|
||||
gMenuListCount -= 8;
|
||||
|
||||
UI_DisplayWelcome();
|
||||
BACKLIGHT_TurnOn();
|
||||
|
1
misc.c
1
misc.c
@ -61,6 +61,7 @@ bool gSetting_KILLED;
|
||||
bool gSetting_200TX;
|
||||
bool gSetting_500TX;
|
||||
bool gSetting_350EN;
|
||||
bool gSetting_TX_EN;
|
||||
uint8_t gSetting_F_LOCK;
|
||||
bool gSetting_ScrambleEnable;
|
||||
|
||||
|
1
misc.h
1
misc.h
@ -118,6 +118,7 @@ extern bool gSetting_KILLED;
|
||||
extern bool gSetting_200TX;
|
||||
extern bool gSetting_500TX;
|
||||
extern bool gSetting_350EN;
|
||||
extern bool gSetting_TX_EN;
|
||||
extern uint8_t gSetting_F_LOCK;
|
||||
extern bool gSetting_ScrambleEnable;
|
||||
|
||||
|
3
radio.c
3
radio.c
@ -908,6 +908,9 @@ void RADIO_PrepareTX(void)
|
||||
State = VFO_STATE_TX_DISABLE;
|
||||
else
|
||||
#endif
|
||||
if (!gSetting_TX_EN)
|
||||
State = VFO_STATE_TX_DISABLE;
|
||||
else
|
||||
if (!FREQUENCY_Check(gCurrentVfo))
|
||||
{
|
||||
if (gCurrentVfo->BUSY_CHANNEL_LOCK && gCurrentFunction == FUNCTION_RECEIVE)
|
||||
|
16
settings.c
16
settings.c
@ -163,13 +163,15 @@ void SETTINGS_SaveSettings(void)
|
||||
EEPROM_WriteBuffer(0x0F18, State);
|
||||
|
||||
memset(State, 0xFF, sizeof(State));
|
||||
State[0] = gSetting_F_LOCK;
|
||||
State[1] = gSetting_350TX;
|
||||
State[2] = gSetting_KILLED;
|
||||
State[3] = gSetting_200TX;
|
||||
State[4] = gSetting_500TX;
|
||||
State[5] = gSetting_350EN;
|
||||
State[6] = gSetting_ScrambleEnable;
|
||||
State[0] = gSetting_F_LOCK;
|
||||
State[1] = gSetting_350TX;
|
||||
State[2] = gSetting_KILLED;
|
||||
State[3] = gSetting_200TX;
|
||||
State[4] = gSetting_500TX;
|
||||
State[5] = gSetting_350EN;
|
||||
State[6] = gSetting_ScrambleEnable;
|
||||
State[7] = 0xff;
|
||||
if (!gSetting_TX_EN) State[7] &= ~(1u << 0);
|
||||
EEPROM_WriteBuffer(0x0F40, State);
|
||||
}
|
||||
|
||||
|
10
ui/menu.c
10
ui/menu.c
@ -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;
|
||||
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
17
ui/status.c
17
ui/status.c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user