0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 06:11:24 +03:00

Scrambler menu now says 'DISABLED' if hidden menu 'SCR EN' is set to disabled

This commit is contained in:
OneOfEleven 2023-12-20 13:10:03 +00:00
parent 2d8d2dddf3
commit 6a84ee1d79
5 changed files with 23 additions and 10 deletions

View File

@ -278,7 +278,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
case MENU_SCRAMBLER:
*pMin = 0;
*pMax = 31;
*pMax = g_eeprom.config.setting.enable_scrambler ? 31 : 0;
break;
case MENU_TX_TO:
@ -531,6 +531,8 @@ void MENU_AcceptSetting(void)
return;
case MENU_SCRAMBLER:
if (g_eeprom.config.setting.enable_scrambler)
{
g_tx_vfo->channel.scrambler = g_sub_menu_selection;
#if 0
if (g_eeprom.config.setting.enable_scrambler)
@ -539,6 +541,12 @@ void MENU_AcceptSetting(void)
BK4819_set_scrambler(0);
#endif
g_request_save_channel = IS_FREQ_CHANNEL(g_tx_vfo->channel_save) ? 2 : 1;
}
else
{
g_tx_vfo->channel.scrambler = 0;
BK4819_set_scrambler(0);
}
return;
case MENU_BUSY_CHAN_LOCK:

Binary file not shown.

Binary file not shown.

View File

@ -539,7 +539,7 @@ void RADIO_ConfigureSquelch(vfo_info_t *p_vfo)
glitch_close = glitch_open + 8;
#else
// more sensitive .. use when RX bandwidths are fixed (no weak signal auto adjust)
// a little more sensitive
rssi_open = (rssi_open * 3) / 4;
noise_open = (noise_open * 4) / 3;

View File

@ -715,6 +715,10 @@ void UI_DisplayMenu(void)
case MENU_SCRAMBLER:
strcpy(str, "INVERT\n");
if (g_eeprom.config.setting.enable_scrambler == 0)
strcat(str, "DISABLED");
else
if (g_sub_menu_selection == 0)
strcat(str, "OFF");
else
@ -726,6 +730,7 @@ void UI_DisplayMenu(void)
else
BK4819_set_scrambler(0);
#endif
channel_setting = true;
break;