mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
Added VOX enable/disable compile option
This commit is contained in:
parent
5f2e069437
commit
f4b637b51a
14
Makefile
14
Makefile
@ -8,27 +8,28 @@ ENABLE_OVERLAY := 0
|
|||||||
ENABLE_LTO := 1
|
ENABLE_LTO := 1
|
||||||
ENABLE_UART := 1
|
ENABLE_UART := 1
|
||||||
ENABLE_AIRCOPY := 0
|
ENABLE_AIRCOPY := 0
|
||||||
ENABLE_FMRADIO := 0
|
ENABLE_FMRADIO := 1
|
||||||
ENABLE_NOAA := 0
|
ENABLE_NOAA := 0
|
||||||
ENABLE_VOICE := 0
|
ENABLE_VOICE := 0
|
||||||
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_TX1750 := 0
|
ENABLE_TX1750 := 1
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_SMALL_BOLD := 1
|
ENABLE_SMALL_BOLD := 1
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
ENABLE_WIDE_RX := 1
|
ENABLE_WIDE_RX := 1
|
||||||
ENABLE_TX_WHEN_AM := 0
|
ENABLE_TX_WHEN_AM := 0
|
||||||
ENABLE_F_CAL_MENU := 1
|
ENABLE_F_CAL_MENU := 0
|
||||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
||||||
ENABLE_MAIN_KEY_HOLD := 1
|
ENABLE_MAIN_KEY_HOLD := 1
|
||||||
ENABLE_BOOT_BEEPS := 0
|
ENABLE_BOOT_BEEPS := 0
|
||||||
ENABLE_COMPANDER := 1
|
ENABLE_COMPANDER := 0
|
||||||
ENABLE_SHOW_CHARGE_LEVEL := 1
|
ENABLE_SHOW_CHARGE_LEVEL := 1
|
||||||
ENABLE_REVERSE_BAT_SYMBOL := 1
|
ENABLE_REVERSE_BAT_SYMBOL := 1
|
||||||
ENABLE_CODE_SCAN_TIMEOUT := 0
|
ENABLE_CODE_SCAN_TIMEOUT := 0
|
||||||
ENABLE_AM_FIX := 1
|
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 := 0
|
||||||
ENABLE_FASTER_CHANNEL_SCAN := 0
|
ENABLE_FASTER_CHANNEL_SCAN := 0
|
||||||
ENABLE_RSSI_BAR := 1
|
ENABLE_RSSI_BAR := 1
|
||||||
ENABLE_AUDIO_BAR := 1
|
ENABLE_AUDIO_BAR := 1
|
||||||
@ -201,6 +202,9 @@ endif
|
|||||||
ifeq ($(ENABLE_VOICE),1)
|
ifeq ($(ENABLE_VOICE),1)
|
||||||
CFLAGS += -DENABLE_VOICE
|
CFLAGS += -DENABLE_VOICE
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_VOX),1)
|
||||||
|
CFLAGS += -DENABLE_VOX
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_ALARM),1)
|
ifeq ($(ENABLE_ALARM),1)
|
||||||
CFLAGS += -DENABLE_ALARM
|
CFLAGS += -DENABLE_ALARM
|
||||||
endif
|
endif
|
||||||
|
@ -34,6 +34,7 @@ ENABLE_AIRCOPY := 0 easier to just enter frequency with but
|
|||||||
ENABLE_FMRADIO := 0 WBFM VHF broadcast band receiver
|
ENABLE_FMRADIO := 0 WBFM VHF broadcast band receiver
|
||||||
ENABLE_NOAA := 0 everything NOAA (only of any use in the USA)
|
ENABLE_NOAA := 0 everything NOAA (only of any use in the USA)
|
||||||
ENABLE_VOICE := 0 want to hear voices ?
|
ENABLE_VOICE := 0 want to hear voices ?
|
||||||
|
ENABLE_VOX := 0
|
||||||
ENABLE_ALARM := 0 TX alarms
|
ENABLE_ALARM := 0 TX alarms
|
||||||
ENABLE_1750HZ := 0 side key 1750Hz TX tone (older style repeater access)
|
ENABLE_1750HZ := 0 side key 1750Hz TX tone (older style repeater access)
|
||||||
ENABLE_BIG_FREQ := 0 big font frequencies (like original QS firmware)
|
ENABLE_BIG_FREQ := 0 big font frequencies (like original QS firmware)
|
||||||
|
12
app/action.c
12
app/action.c
@ -224,8 +224,9 @@ void ACTION_Scan(bool bRestart)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ACTION_Vox(void)
|
#ifdef ENABLE_VOX
|
||||||
{
|
void ACTION_Vox(void)
|
||||||
|
{
|
||||||
gEeprom.VOX_SWITCH = !gEeprom.VOX_SWITCH;
|
gEeprom.VOX_SWITCH = !gEeprom.VOX_SWITCH;
|
||||||
gRequestSaveSettings = true;
|
gRequestSaveSettings = true;
|
||||||
gFlagReconfigureVfos = true;
|
gFlagReconfigureVfos = true;
|
||||||
@ -233,7 +234,8 @@ void ACTION_Vox(void)
|
|||||||
gAnotherVoiceID = VOICE_ID_VOX;
|
gAnotherVoiceID = VOICE_ID_VOX;
|
||||||
#endif
|
#endif
|
||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
static void ACTION_AlarmOr1750(const bool b1750)
|
static void ACTION_AlarmOr1750(const bool b1750)
|
||||||
@ -268,7 +270,9 @@ void ACTION_Vox(void)
|
|||||||
FM_TurnOff();
|
FM_TurnOff();
|
||||||
|
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
|
#endif
|
||||||
gFlagReconfigureVfos = true;
|
gFlagReconfigureVfos = true;
|
||||||
|
|
||||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||||
@ -369,7 +373,9 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
ACTION_Scan(true);
|
ACTION_Scan(true);
|
||||||
break;
|
break;
|
||||||
case ACTION_OPT_VOX:
|
case ACTION_OPT_VOX:
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
ACTION_Vox();
|
ACTION_Vox();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case ACTION_OPT_ALARM:
|
case ACTION_OPT_ALARM:
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
void ACTION_Power(void);
|
void ACTION_Power(void);
|
||||||
void ACTION_Monitor(void);
|
void ACTION_Monitor(void);
|
||||||
void ACTION_Scan(bool bFlag);
|
void ACTION_Scan(bool bFlag);
|
||||||
void ACTION_Vox(void);
|
#ifdef ENABLE_VOX
|
||||||
|
void ACTION_Vox(void);
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
//static void ACTION_AlarmOr1750(bool b1750)
|
//static void ACTION_AlarmOr1750(bool b1750)
|
||||||
#endif
|
#endif
|
||||||
|
20
app/app.c
20
app/app.c
@ -486,7 +486,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
|
|||||||
|
|
||||||
gEnableSpeaker = true;
|
gEnableSpeaker = true;
|
||||||
|
|
||||||
if (gSetting_backlight_on_rx)
|
if (gSetting_backlight_on_tx_rx)
|
||||||
BACKLIGHT_TurnOn();
|
BACKLIGHT_TurnOn();
|
||||||
|
|
||||||
if (gScanState != SCAN_OFF)
|
if (gScanState != SCAN_OFF)
|
||||||
@ -850,6 +850,7 @@ void APP_CheckRadioInterrupts(void)
|
|||||||
if (interrupt_status_bits & BK4819_REG_02_CTCSS_FOUND)
|
if (interrupt_status_bits & BK4819_REG_02_CTCSS_FOUND)
|
||||||
g_CTCSS_Lost = false;
|
g_CTCSS_Lost = false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
if (interrupt_status_bits & BK4819_REG_02_VOX_LOST)
|
if (interrupt_status_bits & BK4819_REG_02_VOX_LOST)
|
||||||
{
|
{
|
||||||
g_VOX_Lost = true;
|
g_VOX_Lost = true;
|
||||||
@ -880,6 +881,7 @@ void APP_CheckRadioInterrupts(void)
|
|||||||
g_VOX_Lost = false;
|
g_VOX_Lost = false;
|
||||||
gVoxPauseCountdown = 0;
|
gVoxPauseCountdown = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_LOST)
|
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_LOST)
|
||||||
{
|
{
|
||||||
@ -934,8 +936,9 @@ void APP_EndTransmission(void)
|
|||||||
RADIO_SetupRegisters(false);
|
RADIO_SetupRegisters(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void APP_HandleVox(void)
|
#ifdef ENABLE_VOX
|
||||||
{
|
static void APP_HandleVox(void)
|
||||||
|
{
|
||||||
if (gSetting_KILLED)
|
if (gSetting_KILLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1010,7 +1013,8 @@ static void APP_HandleVox(void)
|
|||||||
gUpdateDisplay = true;
|
gUpdateDisplay = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void APP_Update(void)
|
void APP_Update(void)
|
||||||
{
|
{
|
||||||
@ -1144,8 +1148,10 @@ void APP_Update(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
if (gEeprom.VOX_SWITCH)
|
if (gEeprom.VOX_SWITCH)
|
||||||
APP_HandleVox();
|
APP_HandleVox();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gSchedulePowerSave)
|
if (gSchedulePowerSave)
|
||||||
{
|
{
|
||||||
@ -1210,8 +1216,10 @@ void APP_Update(void)
|
|||||||
{
|
{
|
||||||
BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable();
|
BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable();
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
if (gEeprom.VOX_SWITCH)
|
if (gEeprom.VOX_SWITCH)
|
||||||
BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD);
|
BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF &&
|
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF &&
|
||||||
gScanState == SCAN_OFF &&
|
gScanState == SCAN_OFF &&
|
||||||
@ -1447,11 +1455,13 @@ void APP_TimeSlice10ms(void)
|
|||||||
if (gFlashLightState == FLASHLIGHT_BLINK && (gFlashLightBlinkCounter & 15u) == 0)
|
if (gFlashLightState == FLASHLIGHT_BLINK && (gFlashLightBlinkCounter & 15u) == 0)
|
||||||
GPIO_FlipBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
GPIO_FlipBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
if (gVoxResumeCountdown > 0)
|
if (gVoxResumeCountdown > 0)
|
||||||
gVoxResumeCountdown--;
|
gVoxResumeCountdown--;
|
||||||
|
|
||||||
if (gVoxPauseCountdown > 0)
|
if (gVoxPauseCountdown > 0)
|
||||||
gVoxPauseCountdown--;
|
gVoxPauseCountdown--;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||||
{
|
{
|
||||||
@ -1997,7 +2007,9 @@ void APP_TimeSlice500ms(void)
|
|||||||
RADIO_EnableCxCSS();
|
RADIO_EnableCxCSS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
|
#endif
|
||||||
|
|
||||||
SYSTEM_DelayMs(5);
|
SYSTEM_DelayMs(5);
|
||||||
|
|
||||||
|
@ -127,7 +127,9 @@ void GENERIC_Key_PTT(bool bKeyPressed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gFlagEndTransmission = false;
|
gFlagEndTransmission = false;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVOX_NoiseDetected = false;
|
gVOX_NoiseDetected = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
||||||
|
@ -209,7 +209,15 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_7:
|
case KEY_7:
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
ACTION_Vox();
|
ACTION_Vox();
|
||||||
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: make use of the function key press
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_8:
|
case KEY_8:
|
||||||
|
16
app/menu.c
16
app/menu.c
@ -219,7 +219,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_ABR_ON_TX_RX:
|
||||||
case MENU_BCL:
|
case MENU_BCL:
|
||||||
case MENU_BEEP:
|
case MENU_BEEP:
|
||||||
case MENU_AUTOLK:
|
case MENU_AUTOLK:
|
||||||
@ -253,7 +253,9 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
|||||||
*pMax = ARRAY_SIZE(gSubMenu_TOT) - 1;
|
*pMax = ARRAY_SIZE(gSubMenu_TOT) - 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
case MENU_VOX:
|
case MENU_VOX:
|
||||||
|
#endif
|
||||||
case MENU_RP_STE:
|
case MENU_RP_STE:
|
||||||
*pMin = 0;
|
*pMin = 0;
|
||||||
*pMax = 10;
|
*pMax = 10;
|
||||||
@ -499,6 +501,7 @@ void MENU_AcceptSetting(void)
|
|||||||
gEeprom.BATTERY_SAVE = gSubMenuSelection;
|
gEeprom.BATTERY_SAVE = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
case MENU_VOX:
|
case MENU_VOX:
|
||||||
gEeprom.VOX_SWITCH = gSubMenuSelection != 0;
|
gEeprom.VOX_SWITCH = gSubMenuSelection != 0;
|
||||||
if (gEeprom.VOX_SWITCH)
|
if (gEeprom.VOX_SWITCH)
|
||||||
@ -507,13 +510,14 @@ void MENU_AcceptSetting(void)
|
|||||||
gFlagReconfigureVfos = true;
|
gFlagReconfigureVfos = true;
|
||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
gEeprom.BACKLIGHT = gSubMenuSelection;
|
gEeprom.BACKLIGHT = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ABR_ON_RX:
|
case MENU_ABR_ON_TX_RX:
|
||||||
gSetting_backlight_on_rx = gSubMenuSelection;
|
gSetting_backlight_on_tx_rx = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_TDR:
|
case MENU_TDR:
|
||||||
@ -917,9 +921,11 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = gEeprom.BATTERY_SAVE;
|
gSubMenuSelection = gEeprom.BATTERY_SAVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
case MENU_VOX:
|
case MENU_VOX:
|
||||||
gSubMenuSelection = gEeprom.VOX_SWITCH ? gEeprom.VOX_LEVEL + 1 : 0;
|
gSubMenuSelection = gEeprom.VOX_SWITCH ? gEeprom.VOX_LEVEL + 1 : 0;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
gSubMenuSelection = gEeprom.BACKLIGHT;
|
gSubMenuSelection = gEeprom.BACKLIGHT;
|
||||||
@ -928,8 +934,8 @@ 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:
|
case MENU_ABR_ON_TX_RX:
|
||||||
gSubMenuSelection = gSetting_backlight_on_rx;
|
gSubMenuSelection = gSetting_backlight_on_tx_rx;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_TDR:
|
case MENU_TDR:
|
||||||
|
@ -412,7 +412,9 @@ void SCANNER_Start(void)
|
|||||||
g_CDCSS_Lost = false;
|
g_CDCSS_Lost = false;
|
||||||
gCDCSSCodeType = 0;
|
gCDCSSCodeType = 0;
|
||||||
g_CTCSS_Lost = false;
|
g_CTCSS_Lost = false;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
g_VOX_Lost = false;
|
g_VOX_Lost = false;
|
||||||
|
#endif
|
||||||
g_SquelchLost = false;
|
g_SquelchLost = false;
|
||||||
gScannerEditState = 0;
|
gScannerEditState = 0;
|
||||||
gScanProgressIndicator = 0;
|
gScanProgressIndicator = 0;
|
||||||
|
16
audio.c
16
audio.c
@ -187,7 +187,9 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
|
|
||||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
|
#endif
|
||||||
|
|
||||||
SYSTEM_DelayMs(5);
|
SYSTEM_DelayMs(5);
|
||||||
BK4819_TurnsOffTones_TurnsOnRX();
|
BK4819_TurnsOffTones_TurnsOnRX();
|
||||||
@ -269,7 +271,11 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 2000;
|
gVoxResumeCountdown = 2000;
|
||||||
|
#endif
|
||||||
|
|
||||||
SYSTEM_DelayMs(5);
|
SYSTEM_DelayMs(5);
|
||||||
AUDIO_PlayVoice(VoiceID);
|
AUDIO_PlayVoice(VoiceID);
|
||||||
|
|
||||||
@ -295,7 +301,11 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
|
|
||||||
gVoiceWriteIndex = 0;
|
gVoiceWriteIndex = 0;
|
||||||
gVoiceReadIndex = 0;
|
gVoiceReadIndex = 0;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +418,10 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
|
|
||||||
gCountdownToPlayNextVoice_10ms = Delay;
|
gCountdownToPlayNextVoice_10ms = Delay;
|
||||||
gFlagPlayQueuedVoice = false;
|
gFlagPlayQueuedVoice = false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 2000;
|
gVoxResumeCountdown = 2000;
|
||||||
|
#endif
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -427,7 +440,10 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
if (!gEnableSpeaker)
|
if (!gEnableSpeaker)
|
||||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
|
#endif
|
||||||
|
|
||||||
gVoiceWriteIndex = 0;
|
gVoiceWriteIndex = 0;
|
||||||
gVoiceReadIndex = 0;
|
gVoiceReadIndex = 0;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +138,9 @@ const uint8_t BITMAP_F_Key[6] =
|
|||||||
0b01000001
|
0b01000001
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_VOX[18] =
|
#ifdef ENABLE_VOX
|
||||||
{ // "VOX"
|
const uint8_t BITMAP_VOX[18] =
|
||||||
|
{ // "VOX"
|
||||||
0b00000000,
|
0b00000000,
|
||||||
0b00011111,
|
0b00011111,
|
||||||
0b00100000,
|
0b00100000,
|
||||||
@ -158,7 +159,8 @@ const uint8_t BITMAP_VOX[18] =
|
|||||||
0b00001000,
|
0b00001000,
|
||||||
0b00010100,
|
0b00010100,
|
||||||
0b01100011
|
0b01100011
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
const uint8_t BITMAP_WX[12] =
|
const uint8_t BITMAP_WX[12] =
|
||||||
|
@ -21,7 +21,9 @@ extern const uint8_t BITMAP_KeyLock[6];
|
|||||||
|
|
||||||
extern const uint8_t BITMAP_F_Key[6];
|
extern const uint8_t BITMAP_F_Key[6];
|
||||||
|
|
||||||
extern const uint8_t BITMAP_VOX[18];
|
#ifdef ENABLE_VOX
|
||||||
|
extern const uint8_t BITMAP_VOX[18];
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
extern const uint8_t BITMAP_WX[12];
|
extern const uint8_t BITMAP_WX[12];
|
||||||
|
6
board.c
6
board.c
@ -532,8 +532,10 @@ void BOARD_EEPROM_Init(void)
|
|||||||
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
|
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
|
||||||
#endif
|
#endif
|
||||||
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
|
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
|
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
|
||||||
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
|
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
|
||||||
|
#endif
|
||||||
gEeprom.MIC_SENSITIVITY = (Data[7] < 5) ? Data[7] : 4;
|
gEeprom.MIC_SENSITIVITY = (Data[7] < 5) ? Data[7] : 4;
|
||||||
|
|
||||||
// 0E78..0E7F
|
// 0E78..0E7F
|
||||||
@ -712,7 +714,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;
|
gSetting_backlight_on_tx_rx = (Data[7] & (1u << 6)) ? true : false;
|
||||||
|
|
||||||
if (!gEeprom.VFO_OPEN)
|
if (!gEeprom.VFO_OPEN)
|
||||||
{
|
{
|
||||||
@ -757,8 +759,10 @@ void BOARD_EEPROM_LoadMoreSettings(void)
|
|||||||
}
|
}
|
||||||
gBatteryCalibration[5] = 2300;
|
gBatteryCalibration[5] = 2300;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
EEPROM_ReadBuffer(0x1F50 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX1_THRESHOLD, 2);
|
EEPROM_ReadBuffer(0x1F50 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX1_THRESHOLD, 2);
|
||||||
EEPROM_ReadBuffer(0x1F68 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX0_THRESHOLD, 2);
|
EEPROM_ReadBuffer(0x1F68 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX0_THRESHOLD, 2);
|
||||||
|
#endif
|
||||||
|
|
||||||
//EEPROM_ReadBuffer(0x1F80 + gEeprom.MIC_SENSITIVITY, &Mic, 1);
|
//EEPROM_ReadBuffer(0x1F80 + gEeprom.MIC_SENSITIVITY, &Mic, 1);
|
||||||
//gEeprom.MIC_SENSITIVITY_TUNING = (Mic < 32) ? Mic : 15;
|
//gEeprom.MIC_SENSITIVITY_TUNING = (Mic < 32) ? Mic : 15;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -22,6 +22,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "bsp/dp32g030/gpio.h"
|
#include "bsp/dp32g030/gpio.h"
|
||||||
#include "dcs.h"
|
#include "dcs.h"
|
||||||
|
#include "driver/backlight.h"
|
||||||
#if defined(ENABLE_FMRADIO)
|
#if defined(ENABLE_FMRADIO)
|
||||||
#include "driver/bk1080.h"
|
#include "driver/bk1080.h"
|
||||||
#endif
|
#endif
|
||||||
@ -60,7 +61,10 @@ void FUNCTION_Init(void)
|
|||||||
g_CDCSS_Lost = false;
|
g_CDCSS_Lost = false;
|
||||||
g_CTCSS_Lost = false;
|
g_CTCSS_Lost = false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
g_VOX_Lost = false;
|
g_VOX_Lost = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_SquelchLost = false;
|
g_SquelchLost = false;
|
||||||
|
|
||||||
gFlagTailNoteEliminationComplete = false;
|
gFlagTailNoteEliminationComplete = false;
|
||||||
@ -226,6 +230,9 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
else
|
else
|
||||||
BK4819_DisableScramble();
|
BK4819_DisableScramble();
|
||||||
|
|
||||||
|
if (gSetting_backlight_on_tx_rx)
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FUNCTION_BAND_SCOPE:
|
case FUNCTION_BAND_SCOPE:
|
||||||
|
@ -75,7 +75,9 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
|||||||
{
|
{
|
||||||
gEeprom.DUAL_WATCH = DUAL_WATCH_OFF;
|
gEeprom.DUAL_WATCH = DUAL_WATCH_OFF;
|
||||||
gEeprom.BATTERY_SAVE = 0;
|
gEeprom.BATTERY_SAVE = 0;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
gEeprom.VOX_SWITCH = false;
|
gEeprom.VOX_SWITCH = false;
|
||||||
|
#endif
|
||||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||||
gEeprom.AUTO_KEYPAD_LOCK = false;
|
gEeprom.AUTO_KEYPAD_LOCK = false;
|
||||||
gEeprom.KEY_1_SHORT_PRESS_ACTION = ACTION_OPT_NONE;
|
gEeprom.KEY_1_SHORT_PRESS_ACTION = ACTION_OPT_NONE;
|
||||||
|
24
misc.c
24
misc.c
@ -45,7 +45,9 @@ const uint16_t dual_watch_count_after_rx_10ms = 1000 / 10; // 1 sec afte
|
|||||||
const uint16_t dual_watch_count_after_1_10ms = 5000 / 10; // 5 sec
|
const uint16_t dual_watch_count_after_1_10ms = 5000 / 10; // 5 sec
|
||||||
const uint16_t dual_watch_count_after_2_10ms = 3600 / 10; // 3.6 sec
|
const uint16_t dual_watch_count_after_2_10ms = 3600 / 10; // 3.6 sec
|
||||||
const uint16_t dual_watch_count_noaa_10ms = 70 / 10; // 70ms
|
const uint16_t dual_watch_count_noaa_10ms = 70 / 10; // 70ms
|
||||||
const uint16_t dual_watch_count_after_vox_10ms = 200 / 10; // 200ms
|
#ifdef ENABLE_VOX
|
||||||
|
const uint16_t dual_watch_count_after_vox_10ms = 200 / 10; // 200ms
|
||||||
|
#endif
|
||||||
const uint16_t dual_watch_count_toggle_10ms = 100 / 10; // 100ms between VFO toggles
|
const uint16_t dual_watch_count_toggle_10ms = 100 / 10; // 100ms between VFO toggles
|
||||||
|
|
||||||
const uint16_t scan_pause_delay_in_1_10ms = 5000 / 10; // 5 seconds
|
const uint16_t scan_pause_delay_in_1_10ms = 5000 / 10; // 5 seconds
|
||||||
@ -61,7 +63,9 @@ const uint16_t battery_save_count_10ms = 10000 / 10; // 10 seconds
|
|||||||
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
||||||
const uint16_t power_save2_10ms = 200 / 10; // 200ms
|
const uint16_t power_save2_10ms = 200 / 10; // 200ms
|
||||||
|
|
||||||
const uint16_t vox_stop_count_down_10ms = 1000 / 10; // 1 second
|
#ifdef ENABLE_VOX
|
||||||
|
const uint16_t vox_stop_count_down_10ms = 1000 / 10; // 1 second
|
||||||
|
#endif
|
||||||
|
|
||||||
const uint16_t NOAA_countdown_10ms = 5000 / 10; // 5 seconds
|
const uint16_t NOAA_countdown_10ms = 5000 / 10; // 5 seconds
|
||||||
const uint16_t NOAA_countdown_2_10ms = 500 / 10; // 500ms
|
const uint16_t NOAA_countdown_2_10ms = 500 / 10; // 500ms
|
||||||
@ -83,7 +87,7 @@ 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;
|
bool gSetting_backlight_on_tx_rx;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
bool gSetting_AM_fix;
|
bool gSetting_AM_fix;
|
||||||
@ -188,12 +192,14 @@ bool g_CDCSS_Lost;
|
|||||||
uint8_t gCDCSSCodeType;
|
uint8_t gCDCSSCodeType;
|
||||||
bool g_CTCSS_Lost;
|
bool g_CTCSS_Lost;
|
||||||
bool g_CxCSS_TAIL_Found;
|
bool g_CxCSS_TAIL_Found;
|
||||||
bool g_VOX_Lost;
|
#ifdef ENABLE_VOX
|
||||||
|
bool g_VOX_Lost;
|
||||||
|
bool gVOX_NoiseDetected;
|
||||||
|
uint16_t gVoxResumeCountdown;
|
||||||
|
uint16_t gVoxPauseCountdown;
|
||||||
|
#endif
|
||||||
bool g_SquelchLost;
|
bool g_SquelchLost;
|
||||||
uint8_t gFlashLightState;
|
uint8_t gFlashLightState;
|
||||||
bool gVOX_NoiseDetected;
|
|
||||||
uint16_t gVoxResumeCountdown;
|
|
||||||
uint16_t gVoxPauseCountdown;
|
|
||||||
volatile uint16_t gFlashLightBlinkCounter;
|
volatile uint16_t gFlashLightBlinkCounter;
|
||||||
bool gFlagEndTransmission;
|
bool gFlagEndTransmission;
|
||||||
uint16_t gLowBatteryCountdown;
|
uint16_t gLowBatteryCountdown;
|
||||||
@ -234,7 +240,9 @@ uint8_t gShowChPrefix;
|
|||||||
volatile bool gNextTimeslice;
|
volatile bool gNextTimeslice;
|
||||||
volatile uint8_t gFoundCDCSSCountdown_10ms;
|
volatile uint8_t gFoundCDCSSCountdown_10ms;
|
||||||
volatile uint8_t gFoundCTCSSCountdown_10ms;
|
volatile uint8_t gFoundCTCSSCountdown_10ms;
|
||||||
volatile uint16_t gVoxStopCountdown_10ms;
|
#ifdef ENABLE_VOX
|
||||||
|
volatile uint16_t gVoxStopCountdown_10ms;
|
||||||
|
#endif
|
||||||
volatile bool gNextTimeslice40ms;
|
volatile bool gNextTimeslice40ms;
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
volatile uint16_t gNOAACountdown_10ms = 0;
|
volatile uint16_t gNOAACountdown_10ms = 0;
|
||||||
|
24
misc.h
24
misc.h
@ -116,7 +116,9 @@ extern const uint16_t battery_save_count_10ms;
|
|||||||
extern const uint16_t power_save1_10ms;
|
extern const uint16_t power_save1_10ms;
|
||||||
extern const uint16_t power_save2_10ms;
|
extern const uint16_t power_save2_10ms;
|
||||||
|
|
||||||
extern const uint16_t vox_stop_count_down_10ms;
|
#ifdef ENABLE_VOX
|
||||||
|
extern const uint16_t vox_stop_count_down_10ms;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern const uint16_t NOAA_countdown_10ms;
|
extern const uint16_t NOAA_countdown_10ms;
|
||||||
extern const uint16_t NOAA_countdown_2_10ms;
|
extern const uint16_t NOAA_countdown_2_10ms;
|
||||||
@ -128,7 +130,9 @@ extern const uint16_t dual_watch_count_after_1_10ms;
|
|||||||
extern const uint16_t dual_watch_count_after_2_10ms;
|
extern const uint16_t dual_watch_count_after_2_10ms;
|
||||||
extern const uint16_t dual_watch_count_toggle_10ms;
|
extern const uint16_t dual_watch_count_toggle_10ms;
|
||||||
extern const uint16_t dual_watch_count_noaa_10ms;
|
extern const uint16_t dual_watch_count_noaa_10ms;
|
||||||
extern const uint16_t dual_watch_count_after_vox_10ms;
|
#ifdef ENABLE_VOX
|
||||||
|
extern const uint16_t dual_watch_count_after_vox_10ms;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern const uint16_t scan_pause_delay_in_1_10ms;
|
extern const uint16_t scan_pause_delay_in_1_10ms;
|
||||||
extern const uint16_t scan_pause_delay_in_2_10ms;
|
extern const uint16_t scan_pause_delay_in_2_10ms;
|
||||||
@ -152,7 +156,7 @@ 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;
|
extern bool gSetting_backlight_on_tx_rx;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
extern bool gSetting_AM_fix;
|
extern bool gSetting_AM_fix;
|
||||||
@ -258,12 +262,14 @@ extern bool g_CDCSS_Lost;
|
|||||||
extern uint8_t gCDCSSCodeType;
|
extern uint8_t gCDCSSCodeType;
|
||||||
extern bool g_CTCSS_Lost;
|
extern bool g_CTCSS_Lost;
|
||||||
extern bool g_CxCSS_TAIL_Found;
|
extern bool g_CxCSS_TAIL_Found;
|
||||||
extern bool g_VOX_Lost;
|
#ifdef ENABLE_VOX
|
||||||
|
extern bool g_VOX_Lost;
|
||||||
|
extern bool gVOX_NoiseDetected;
|
||||||
|
extern uint16_t gVoxResumeCountdown;
|
||||||
|
extern uint16_t gVoxPauseCountdown;
|
||||||
|
#endif
|
||||||
extern bool g_SquelchLost;
|
extern bool g_SquelchLost;
|
||||||
extern uint8_t gFlashLightState;
|
extern uint8_t gFlashLightState;
|
||||||
extern bool gVOX_NoiseDetected;
|
|
||||||
extern uint16_t gVoxResumeCountdown;
|
|
||||||
extern uint16_t gVoxPauseCountdown;
|
|
||||||
extern volatile uint16_t gFlashLightBlinkCounter;
|
extern volatile uint16_t gFlashLightBlinkCounter;
|
||||||
extern bool gFlagEndTransmission;
|
extern bool gFlagEndTransmission;
|
||||||
extern uint16_t gLowBatteryCountdown;
|
extern uint16_t gLowBatteryCountdown;
|
||||||
@ -300,7 +306,9 @@ extern bool gF_LOCK;
|
|||||||
extern uint8_t gShowChPrefix;
|
extern uint8_t gShowChPrefix;
|
||||||
extern volatile uint8_t gFoundCDCSSCountdown_10ms;
|
extern volatile uint8_t gFoundCDCSSCountdown_10ms;
|
||||||
extern volatile uint8_t gFoundCTCSSCountdown_10ms;
|
extern volatile uint8_t gFoundCTCSSCountdown_10ms;
|
||||||
extern volatile uint16_t gVoxStopCountdown_10ms;
|
#ifdef ENABLE_VOX
|
||||||
|
extern volatile uint16_t gVoxStopCountdown_10ms;
|
||||||
|
#endif
|
||||||
extern volatile bool gNextTimeslice40ms;
|
extern volatile bool gNextTimeslice40ms;
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
extern volatile uint16_t gNOAACountdown_10ms;
|
extern volatile uint16_t gNOAACountdown_10ms;
|
||||||
|
2
radio.c
2
radio.c
@ -698,6 +698,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
if (gEeprom.VOX_SWITCH && !gFmRadioMode && IS_NOT_NOAA_CHANNEL(gCurrentVfo->CHANNEL_SAVE) && gCurrentVfo->AM_mode == 0)
|
if (gEeprom.VOX_SWITCH && !gFmRadioMode && IS_NOT_NOAA_CHANNEL(gCurrentVfo->CHANNEL_SAVE) && gCurrentVfo->AM_mode == 0)
|
||||||
@ -716,6 +717,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
|||||||
InterruptMask |= BK4819_REG_3F_VOX_FOUND | BK4819_REG_3F_VOX_LOST;
|
InterruptMask |= BK4819_REG_3F_VOX_FOUND | BK4819_REG_3F_VOX_LOST;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
BK4819_DisableVox();
|
BK4819_DisableVox();
|
||||||
|
|
||||||
#ifdef ENABLE_COMPANDER
|
#ifdef ENABLE_COMPANDER
|
||||||
|
@ -104,7 +104,9 @@ void SystickHandler(void)
|
|||||||
DECREMENT_AND_TRIGGER(gFmPlayCountdown_10ms, gScheduleFM);
|
DECREMENT_AND_TRIGGER(gFmPlayCountdown_10ms, gScheduleFM);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
DECREMENT(gVoxStopCountdown_10ms);
|
DECREMENT(gVoxStopCountdown_10ms);
|
||||||
|
#endif
|
||||||
|
|
||||||
DECREMENT(boot_counter_10ms);
|
DECREMENT(boot_counter_10ms);
|
||||||
}
|
}
|
||||||
|
@ -86,8 +86,13 @@ void SETTINGS_SaveSettings(void)
|
|||||||
State[3] = false;
|
State[3] = false;
|
||||||
#endif
|
#endif
|
||||||
State[4] = gEeprom.KEY_LOCK;
|
State[4] = gEeprom.KEY_LOCK;
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
State[5] = gEeprom.VOX_SWITCH;
|
State[5] = gEeprom.VOX_SWITCH;
|
||||||
State[6] = gEeprom.VOX_LEVEL;
|
State[6] = gEeprom.VOX_LEVEL;
|
||||||
|
#else
|
||||||
|
State[5] = false;
|
||||||
|
State[6] = 0;
|
||||||
|
#endif
|
||||||
State[7] = gEeprom.MIC_SENSITIVITY;
|
State[7] = gEeprom.MIC_SENSITIVITY;
|
||||||
EEPROM_WriteBuffer(0x0E70, State);
|
EEPROM_WriteBuffer(0x0E70, State);
|
||||||
|
|
||||||
@ -174,7 +179,7 @@ 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);
|
if (!gSetting_backlight_on_tx_rx) State[7] &= ~(1u << 6);
|
||||||
|
|
||||||
EEPROM_WriteBuffer(0x0F40, State);
|
EEPROM_WriteBuffer(0x0F40, State);
|
||||||
}
|
}
|
||||||
|
10
ui/menu.c
10
ui/menu.c
@ -62,9 +62,11 @@ const t_menu_item MenuList[] =
|
|||||||
{"CH NAM", VOICE_ID_INVALID, MENU_MEM_NAME },
|
{"CH NAM", VOICE_ID_INVALID, MENU_MEM_NAME },
|
||||||
{"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"
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
{"VOX", VOICE_ID_VOX, MENU_VOX },
|
{"VOX", VOICE_ID_VOX, MENU_VOX },
|
||||||
|
#endif
|
||||||
{"BLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
|
{"BLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
|
||||||
{"BLT RX", VOICE_ID_INVALID, MENU_ABR_ON_RX },
|
{"BLTTRX", VOICE_ID_INVALID, MENU_ABR_ON_TX_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
|
||||||
@ -110,7 +112,7 @@ const t_menu_item MenuList[] =
|
|||||||
{"AM FIX", VOICE_ID_INVALID, MENU_AM_FIX },
|
{"AM FIX", VOICE_ID_INVALID, MENU_AM_FIX },
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AM_FIX_TEST1
|
#ifdef ENABLE_AM_FIX_TEST1
|
||||||
{"AM FT1", VOICE_ID_INVALID, MENU_AM_FIX_TEST1},
|
{"AM FT1", VOICE_ID_INVALID, MENU_AM_FIX_TEST1 },
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
{"NOAA-S", VOICE_ID_INVALID, MENU_NOAA_S },
|
{"NOAA-S", VOICE_ID_INVALID, MENU_NOAA_S },
|
||||||
@ -558,12 +560,14 @@ void UI_DisplayMenu(void)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
case MENU_VOX:
|
case MENU_VOX:
|
||||||
if (gSubMenuSelection == 0)
|
if (gSubMenuSelection == 0)
|
||||||
strcpy(String, "OFF");
|
strcpy(String, "OFF");
|
||||||
else
|
else
|
||||||
sprintf(String, "%d", gSubMenuSelection);
|
sprintf(String, "%d", gSubMenuSelection);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
strcpy(String, gSubMenu_BACKLIGHT[gSubMenuSelection]);
|
strcpy(String, gSubMenu_BACKLIGHT[gSubMenuSelection]);
|
||||||
@ -593,7 +597,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_ABR_ON_TX_RX:
|
||||||
case MENU_BCL:
|
case MENU_BCL:
|
||||||
case MENU_BEEP:
|
case MENU_BEEP:
|
||||||
case MENU_S_ADD1:
|
case MENU_S_ADD1:
|
||||||
|
@ -49,9 +49,11 @@ enum
|
|||||||
MENU_MEM_NAME,
|
MENU_MEM_NAME,
|
||||||
MENU_MDF,
|
MENU_MDF,
|
||||||
MENU_SAVE,
|
MENU_SAVE,
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
MENU_VOX,
|
MENU_VOX,
|
||||||
|
#endif
|
||||||
MENU_ABR,
|
MENU_ABR,
|
||||||
MENU_ABR_ON_RX,
|
MENU_ABR_ON_TX_RX,
|
||||||
MENU_TDR,
|
MENU_TDR,
|
||||||
MENU_BEEP,
|
MENU_BEEP,
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
|
@ -131,6 +131,7 @@ void UI_DisplayStatus(const bool test_display)
|
|||||||
}
|
}
|
||||||
x += sizeof(BITMAP_XB);
|
x += sizeof(BITMAP_XB);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOX
|
||||||
// VOX indicator
|
// VOX indicator
|
||||||
if (gEeprom.VOX_SWITCH || test_display)
|
if (gEeprom.VOX_SWITCH || test_display)
|
||||||
{
|
{
|
||||||
@ -138,6 +139,7 @@ void UI_DisplayStatus(const bool test_display)
|
|||||||
x1 = x + sizeof(BITMAP_VOX);
|
x1 = x + sizeof(BITMAP_VOX);
|
||||||
}
|
}
|
||||||
x += sizeof(BITMAP_VOX);
|
x += sizeof(BITMAP_VOX);
|
||||||
|
#endif
|
||||||
|
|
||||||
// KEY-LOCK indicator
|
// KEY-LOCK indicator
|
||||||
if (gEeprom.KEY_LOCK || test_display)
|
if (gEeprom.KEY_LOCK || test_display)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user