0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-29 14:51:26 +03:00

Added backlight on RX menu option "BLT RX"

This commit is contained in:
OneOfEleven 2023-10-03 13:18:49 +01:00
parent ac05207ef0
commit 84e174544d
12 changed files with 21 additions and 5 deletions

View File

@ -30,7 +30,6 @@ ENABLE_AM_FIX := 1
ENABLE_AM_FIX_SHOW_DATA := 1 ENABLE_AM_FIX_SHOW_DATA := 1
ENABLE_SQUELCH_MORE_SENSITIVE := 1 ENABLE_SQUELCH_MORE_SENSITIVE := 1
ENABLE_FASTER_CHANNEL_SCAN := 0 ENABLE_FASTER_CHANNEL_SCAN := 0
ENABLE_BACKLIGHT_ON_RX := 0
ENABLE_RSSI_BAR := 1 ENABLE_RSSI_BAR := 1
ENABLE_AUDIO_BAR := 1 ENABLE_AUDIO_BAR := 1
#ENABLE_COPY_CHAN_TO_VFO := 1 #ENABLE_COPY_CHAN_TO_VFO := 1

View File

@ -53,7 +53,6 @@ ENABLE_AM_FIX := 1 dynamically adjust the front end gains
ENABLE_AM_FIX_SHOW_DATA := 1 show debug data for the AM fix (still tweaking it) ENABLE_AM_FIX_SHOW_DATA := 1 show debug data for the AM fix (still tweaking it)
ENABLE_SQUELCH_MORE_SENSITIVE := 1 make squelch levels a little bit more sensitive - I plan to let user adjust the values themselves ENABLE_SQUELCH_MORE_SENSITIVE := 1 make squelch levels a little bit more sensitive - I plan to let user adjust the values themselves
ENABLE_FASTER_CHANNEL_SCAN := 0 increases the channel scan speed, but the squelch is also made more twitchy ENABLE_FASTER_CHANNEL_SCAN := 0 increases the channel scan speed, but the squelch is also made more twitchy
ENABLE_BACKLIGHT_ON_RX := 0 turn the backlight on when the squelch opens
ENABLE_RSSI_BAR := 1 enable a dBm/Sn RSSI bar graph level inplace of the little antenna symbols ENABLE_RSSI_BAR := 1 enable a dBm/Sn RSSI bar graph level inplace of the little antenna symbols
ENABLE_AUDIO_BAR := 0 experimental, display an audo bar level when TX'ing ENABLE_AUDIO_BAR := 0 experimental, display an audo bar level when TX'ing
#ENABLE_COPY_CHAN_TO_VFO := 1 not yet implemented - copy the current channel into the VFO #ENABLE_COPY_CHAN_TO_VFO := 1 not yet implemented - copy the current channel into the VFO

View File

@ -486,9 +486,8 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
gEnableSpeaker = true; gEnableSpeaker = true;
#ifdef ENABLE_BACKLIGHT_ON_RX if (gSetting_backlight_on_rx)
BACKLIGHT_TurnOn(); BACKLIGHT_TurnOn();
#endif
if (gScanState != SCAN_OFF) if (gScanState != SCAN_OFF)
{ {

View File

@ -212,6 +212,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
#ifdef ENABLE_AUDIO_BAR #ifdef ENABLE_AUDIO_BAR
case MENU_MIC_BAR: case MENU_MIC_BAR:
#endif #endif
case MENU_ABR_ON_RX:
case MENU_BCL: case MENU_BCL:
case MENU_BEEP: case MENU_BEEP:
case MENU_AUTOLK: case MENU_AUTOLK:
@ -504,6 +505,10 @@ void MENU_AcceptSetting(void)
gEeprom.BACKLIGHT = gSubMenuSelection; gEeprom.BACKLIGHT = gSubMenuSelection;
break; break;
case MENU_ABR_ON_RX:
gSetting_backlight_on_rx = gSubMenuSelection;
break;
case MENU_TDR: case MENU_TDR:
gEeprom.DUAL_WATCH = gSubMenuSelection; gEeprom.DUAL_WATCH = gSubMenuSelection;
gFlagReconfigureVfos = true; gFlagReconfigureVfos = true;
@ -916,6 +921,10 @@ void MENU_ShowCurrentSetting(void)
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON while in backlight menu GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON while in backlight menu
break; break;
case MENU_ABR_ON_RX:
gSubMenuSelection = gSetting_backlight_on_rx;
break;
case MENU_TDR: case MENU_TDR:
gSubMenuSelection = gEeprom.DUAL_WATCH; gSubMenuSelection = gEeprom.DUAL_WATCH;
break; break;

View File

@ -712,6 +712,7 @@ void BOARD_EEPROM_Init(void)
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
gSetting_AM_fix = (Data[7] & (1u << 5)) ? true : false; gSetting_AM_fix = (Data[7] & (1u << 5)) ? true : false;
#endif #endif
gSetting_backlight_on_rx = (Data[7] & (1u << 6)) ? true : false;
if (!gEeprom.VFO_OPEN) if (!gEeprom.VFO_OPEN)
{ {

Binary file not shown.

Binary file not shown.

2
misc.c
View File

@ -83,6 +83,8 @@ bool gSetting_TX_EN;
uint8_t gSetting_F_LOCK; uint8_t gSetting_F_LOCK;
bool gSetting_ScrambleEnable; bool gSetting_ScrambleEnable;
bool gSetting_backlight_on_rx;
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
bool gSetting_AM_fix; bool gSetting_AM_fix;
#endif #endif

2
misc.h
View File

@ -152,6 +152,8 @@ extern bool gSetting_TX_EN;
extern uint8_t gSetting_F_LOCK; extern uint8_t gSetting_F_LOCK;
extern bool gSetting_ScrambleEnable; extern bool gSetting_ScrambleEnable;
extern bool gSetting_backlight_on_rx;
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
extern bool gSetting_AM_fix; extern bool gSetting_AM_fix;
#endif #endif

View File

@ -174,6 +174,8 @@ void SETTINGS_SaveSettings(void)
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
if (!gSetting_AM_fix) State[7] &= ~(1u << 5); if (!gSetting_AM_fix) State[7] &= ~(1u << 5);
#endif #endif
if (!gSetting_backlight_on_rx) State[7] &= ~(1u << 6);
EEPROM_WriteBuffer(0x0F40, State); EEPROM_WriteBuffer(0x0F40, State);
} }

View File

@ -62,7 +62,8 @@ const t_menu_item MenuList[] =
{"CH DIS", VOICE_ID_INVALID, MENU_MDF }, // was "MDF" {"CH DIS", VOICE_ID_INVALID, MENU_MDF }, // was "MDF"
{"BATSAV", VOICE_ID_SAVE_MODE, MENU_SAVE }, // was "SAVE" {"BATSAV", VOICE_ID_SAVE_MODE, MENU_SAVE }, // was "SAVE"
{"VOX", VOICE_ID_VOX, MENU_VOX }, {"VOX", VOICE_ID_VOX, MENU_VOX },
{"BACKLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR" {"BLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
{"BLT RX", VOICE_ID_INVALID, MENU_ABR_ON_RX },
{"DUALRX", VOICE_ID_DUAL_STANDBY, MENU_TDR }, // was "TDR" {"DUALRX", VOICE_ID_DUAL_STANDBY, MENU_TDR }, // was "TDR"
{"BEEP", VOICE_ID_BEEP_PROMPT, MENU_BEEP }, {"BEEP", VOICE_ID_BEEP_PROMPT, MENU_BEEP },
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE
@ -591,6 +592,7 @@ void UI_DisplayMenu(void)
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
case MENU_AM_FIX: case MENU_AM_FIX:
#endif #endif
case MENU_ABR_ON_RX:
case MENU_BCL: case MENU_BCL:
case MENU_BEEP: case MENU_BEEP:
case MENU_S_ADD1: case MENU_S_ADD1:

View File

@ -51,6 +51,7 @@ enum
MENU_SAVE, MENU_SAVE,
MENU_VOX, MENU_VOX,
MENU_ABR, MENU_ABR,
MENU_ABR_ON_RX,
MENU_TDR, MENU_TDR,
MENU_BEEP, MENU_BEEP,
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE