forked from mirror/uv-k5-firmware
Ability to disable ALARM and TX1750.
This commit is contained in:
parent
65d7e517af
commit
6c81075980
8
Makefile
8
Makefile
@ -1,10 +1,12 @@
|
|||||||
TARGET = firmware
|
TARGET = firmware
|
||||||
|
|
||||||
ENABLE_AIRCOPY := 1
|
ENABLE_AIRCOPY := 1
|
||||||
|
ENABLE_ALARM := 1
|
||||||
ENABLE_FMRADIO := 1
|
ENABLE_FMRADIO := 1
|
||||||
ENABLE_NOAA := 1
|
ENABLE_NOAA := 1
|
||||||
ENABLE_OVERLAY := 1
|
ENABLE_OVERLAY := 1
|
||||||
ENABLE_SWD := 0
|
ENABLE_SWD := 0
|
||||||
|
ENABLE_TX1750 := 1
|
||||||
ENABLE_UART := 1
|
ENABLE_UART := 1
|
||||||
|
|
||||||
BSP_DEFINITIONS := $(wildcard hardware/*/*.def)
|
BSP_DEFINITIONS := $(wildcard hardware/*/*.def)
|
||||||
@ -123,6 +125,9 @@ CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
|||||||
ifeq ($(ENABLE_AIRCOPY),1)
|
ifeq ($(ENABLE_AIRCOPY),1)
|
||||||
CFLAGS += -DENABLE_AIRCOPY
|
CFLAGS += -DENABLE_AIRCOPY
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_ALARM),1)
|
||||||
|
CFLAGS += -DENABLE_ALARM
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_FMRADIO),1)
|
ifeq ($(ENABLE_FMRADIO),1)
|
||||||
CFLAGS += -DENABLE_FMRADIO
|
CFLAGS += -DENABLE_FMRADIO
|
||||||
endif
|
endif
|
||||||
@ -135,6 +140,9 @@ endif
|
|||||||
ifeq ($(ENABLE_SWD),1)
|
ifeq ($(ENABLE_SWD),1)
|
||||||
CFLAGS += -DENABLE_SWD
|
CFLAGS += -DENABLE_SWD
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_TX1750),1)
|
||||||
|
CFLAGS += -DENABLE_TX1750
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_UART),1)
|
ifeq ($(ENABLE_UART),1)
|
||||||
CFLAGS += -DENABLE_UART
|
CFLAGS += -DENABLE_UART
|
||||||
endif
|
endif
|
||||||
|
13
app/action.c
13
app/action.c
@ -150,18 +150,27 @@ void ACTION_Vox(void)
|
|||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
static void ACTION_AlarmOr1750(bool b1750)
|
static void ACTION_AlarmOr1750(bool b1750)
|
||||||
{
|
{
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
|
#if defined(ENABLE_ALARM) && defined(ENABLE_TX1750)
|
||||||
if (b1750) {
|
if (b1750) {
|
||||||
gAlarmState = ALARM_STATE_TX1750;
|
gAlarmState = ALARM_STATE_TX1750;
|
||||||
} else {
|
} else {
|
||||||
gAlarmState = ALARM_STATE_TXALARM;
|
gAlarmState = ALARM_STATE_TXALARM;
|
||||||
}
|
}
|
||||||
gAlarmRunningCounter = 0;
|
gAlarmRunningCounter = 0;
|
||||||
|
#elif defined(ENABLE_ALARM)
|
||||||
|
gAlarmState = ALARM_STATE_TXALARM;
|
||||||
|
gAlarmRunningCounter = 0;
|
||||||
|
#else
|
||||||
|
gAlarmState = ALARM_STATE_TX1750;
|
||||||
|
#endif
|
||||||
gFlagPrepareTX = true;
|
gFlagPrepareTX = true;
|
||||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_FMRADIO)
|
#if defined(ENABLE_FMRADIO)
|
||||||
void ACTION_FM(void)
|
void ACTION_FM(void)
|
||||||
@ -246,7 +255,9 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
ACTION_Vox();
|
ACTION_Vox();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
ACTION_AlarmOr1750(false);
|
ACTION_AlarmOr1750(false);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
#if defined(ENABLE_FMRADIO)
|
#if defined(ENABLE_FMRADIO)
|
||||||
@ -254,7 +265,9 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
#if defined(ENABLE_TX1750)
|
||||||
ACTION_AlarmOr1750(true);
|
ACTION_AlarmOr1750(true);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
app/app.c
10
app/app.c
@ -909,6 +909,7 @@ void APP_TimeSlice10ms(void)
|
|||||||
gVoxPauseCountdown--;
|
gVoxPauseCountdown--;
|
||||||
}
|
}
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
if (gAlarmState == ALARM_STATE_TXALARM || gAlarmState == ALARM_STATE_ALARM) {
|
if (gAlarmState == ALARM_STATE_TXALARM || gAlarmState == ALARM_STATE_ALARM) {
|
||||||
uint16_t Tone;
|
uint16_t Tone;
|
||||||
|
|
||||||
@ -944,6 +945,7 @@ void APP_TimeSlice10ms(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (gRTTECountdown) {
|
if (gRTTECountdown) {
|
||||||
gRTTECountdown--;
|
gRTTECountdown--;
|
||||||
if (gRTTECountdown == 0) {
|
if (gRTTECountdown == 0) {
|
||||||
@ -1263,6 +1265,7 @@ void APP_TimeSlice500ms(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
static void ALARM_Off(void)
|
static void ALARM_Off(void)
|
||||||
{
|
{
|
||||||
gAlarmState = ALARM_STATE_OFF;
|
gAlarmState = ALARM_STATE_OFF;
|
||||||
@ -1277,6 +1280,7 @@ static void ALARM_Off(void)
|
|||||||
RADIO_SetupRegisters(true);
|
RADIO_SetupRegisters(true);
|
||||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CHANNEL_Next(bool bBackup, int8_t Direction)
|
void CHANNEL_Next(bool bBackup, int8_t Direction)
|
||||||
{
|
{
|
||||||
@ -1433,7 +1437,11 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
|
|
||||||
if (!bFlag) {
|
if (!bFlag) {
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
if (gAlarmState == ALARM_STATE_OFF) {
|
if (gAlarmState == ALARM_STATE_OFF) {
|
||||||
|
#else
|
||||||
|
if (1) {
|
||||||
|
#endif
|
||||||
if (Key == KEY_PTT) {
|
if (Key == KEY_PTT) {
|
||||||
GENERIC_Key_PTT(bKeyPressed);
|
GENERIC_Key_PTT(bKeyPressed);
|
||||||
} else {
|
} else {
|
||||||
@ -1473,6 +1481,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!bKeyHeld && bKeyPressed) {
|
} else if (!bKeyHeld && bKeyPressed) {
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
ALARM_Off();
|
ALARM_Off();
|
||||||
if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0) {
|
if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0) {
|
||||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||||
@ -1484,6 +1493,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
} else {
|
} else {
|
||||||
gPttWasReleased = true;
|
gPttWasReleased = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else if (Key != KEY_SIDE1 && Key != KEY_SIDE2) {
|
} else if (Key != KEY_SIDE1 && Key != KEY_SIDE2) {
|
||||||
switch (gScreenToDisplay) {
|
switch (gScreenToDisplay) {
|
||||||
|
@ -151,7 +151,10 @@ int MENU_GetLimits(uint8_t Cursor, uint8_t *pMin, uint8_t *pMax)
|
|||||||
case MENU_W_N: case MENU_BCL:
|
case MENU_W_N: case MENU_BCL:
|
||||||
case MENU_BEEP: case MENU_AUTOLK:
|
case MENU_BEEP: case MENU_AUTOLK:
|
||||||
case MENU_S_ADD1: case MENU_S_ADD2:
|
case MENU_S_ADD1: case MENU_S_ADD2:
|
||||||
case MENU_STE: case MENU_AL_MOD:
|
case MENU_STE:
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
case MENU_AL_MOD:
|
||||||
|
#endif
|
||||||
case MENU_D_ST: case MENU_D_DCD:
|
case MENU_D_ST: case MENU_D_DCD:
|
||||||
case MENU_AM:
|
case MENU_AM:
|
||||||
#if defined(ENABLE_NOAA)
|
#if defined(ENABLE_NOAA)
|
||||||
@ -420,9 +423,11 @@ void MENU_AcceptSetting(void)
|
|||||||
gEeprom.SCAN_LIST_DEFAULT = gSubMenuSelection - 1;
|
gEeprom.SCAN_LIST_DEFAULT = gSubMenuSelection - 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
case MENU_AL_MOD:
|
case MENU_AL_MOD:
|
||||||
gEeprom.ALARM_MODE = gSubMenuSelection;
|
gEeprom.ALARM_MODE = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_D_ST:
|
case MENU_D_ST:
|
||||||
gEeprom.DTMF_SIDE_TONE = gSubMenuSelection;
|
gEeprom.DTMF_SIDE_TONE = gSubMenuSelection;
|
||||||
@ -753,9 +758,11 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 1);
|
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
case MENU_AL_MOD:
|
case MENU_AL_MOD:
|
||||||
gSubMenuSelection = gEeprom.ALARM_MODE;
|
gSubMenuSelection = gEeprom.ALARM_MODE;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_D_ST:
|
case MENU_D_ST:
|
||||||
gSubMenuSelection = gEeprom.DTMF_SIDE_TONE;
|
gSubMenuSelection = gEeprom.DTMF_SIDE_TONE;
|
||||||
|
2
board.c
2
board.c
@ -592,7 +592,9 @@ void BOARD_EEPROM_Init(void)
|
|||||||
|
|
||||||
// 0EA8..0EAF
|
// 0EA8..0EAF
|
||||||
EEPROM_ReadBuffer(0x0EA8, Data, 8);
|
EEPROM_ReadBuffer(0x0EA8, Data, 8);
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
gEeprom.ALARM_MODE = (Data[0] < 2) ? Data[0] : true;
|
gEeprom.ALARM_MODE = (Data[0] < 2) ? Data[0] : true;
|
||||||
|
#endif
|
||||||
gEeprom.ROGER = (Data[1] < 3) ? Data[1] : ROGER_MODE_OFF;
|
gEeprom.ROGER = (Data[1] < 3) ? Data[1] : ROGER_MODE_OFF;
|
||||||
gEeprom.REPEATER_TAIL_TONE_ELIMINATION = (Data[2] < 11) ? Data[2] : 0;
|
gEeprom.REPEATER_TAIL_TONE_ELIMINATION = (Data[2] < 11) ? Data[2] : 0;
|
||||||
gEeprom.TX_CHANNEL = (Data[3] < 2) ? Data[3] : 0;
|
gEeprom.TX_CHANNEL = (Data[3] < 2) ? Data[3] : 0;
|
||||||
|
13
functions.c
13
functions.c
@ -130,6 +130,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
if (gAlarmState == ALARM_STATE_TXALARM && gEeprom.ALARM_MODE != ALARM_MODE_TONE) {
|
if (gAlarmState == ALARM_STATE_TXALARM && gEeprom.ALARM_MODE != ALARM_MODE_TONE) {
|
||||||
gAlarmState = ALARM_STATE_ALARM;
|
gAlarmState = ALARM_STATE_ALARM;
|
||||||
GUI_DisplayScreen();
|
GUI_DisplayScreen();
|
||||||
@ -144,6 +145,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
gAlarmToneCounter = 0;
|
gAlarmToneCounter = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GUI_DisplayScreen();
|
GUI_DisplayScreen();
|
||||||
RADIO_SetTxParameters();
|
RADIO_SetTxParameters();
|
||||||
@ -151,18 +153,27 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
|
|
||||||
DTMF_Reply();
|
DTMF_Reply();
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
if (gAlarmState != ALARM_STATE_OFF) {
|
if (gAlarmState != ALARM_STATE_OFF) {
|
||||||
|
#if defined(ENABLE_TX1750)
|
||||||
if (gAlarmState == ALARM_STATE_TX1750) {
|
if (gAlarmState == ALARM_STATE_TX1750) {
|
||||||
BK4819_TransmitTone(true, 1750);
|
BK4819_TransmitTone(true, 1750);
|
||||||
} else {
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
if (gAlarmState == ALARM_STATE_TXALARM) {
|
||||||
BK4819_TransmitTone(true, 500);
|
BK4819_TransmitTone(true, 500);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
SYSTEM_DelayMs(2);
|
SYSTEM_DelayMs(2);
|
||||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
gAlarmToneCounter = 0;
|
gAlarmToneCounter = 0;
|
||||||
|
#endif
|
||||||
gEnableSpeaker = true;
|
gEnableSpeaker = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (gCurrentVfo->SCRAMBLING_TYPE && gSetting_ScrambleEnable) {
|
if (gCurrentVfo->SCRAMBLING_TYPE && gSetting_ScrambleEnable) {
|
||||||
BK4819_EnableScramble(gCurrentVfo->SCRAMBLING_TYPE - 1U);
|
BK4819_EnableScramble(gCurrentVfo->SCRAMBLING_TYPE - 1U);
|
||||||
} else {
|
} else {
|
||||||
|
@ -62,7 +62,10 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
|||||||
gMenuCursor = MENU_350TX;
|
gMenuCursor = MENU_350TX;
|
||||||
gSubMenuSelection = gSetting_350TX;
|
gSubMenuSelection = gSetting_350TX;
|
||||||
GUI_SelectNextDisplay(DISPLAY_MENU);
|
GUI_SelectNextDisplay(DISPLAY_MENU);
|
||||||
gMenuListCount = 56;
|
gMenuListCount = 55;
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
gMenuListCount++;
|
||||||
|
#endif
|
||||||
#if defined(ENABLE_NOAA)
|
#if defined(ENABLE_NOAA)
|
||||||
gMenuListCount++;
|
gMenuListCount++;
|
||||||
#endif
|
#endif
|
||||||
|
5
main.c
5
main.c
@ -104,7 +104,10 @@ void Main(void)
|
|||||||
UI_DisplayWelcome();
|
UI_DisplayWelcome();
|
||||||
BACKLIGHT_TurnOn();
|
BACKLIGHT_TurnOn();
|
||||||
SYSTEM_DelayMs(1000);
|
SYSTEM_DelayMs(1000);
|
||||||
gMenuListCount = 50;
|
gMenuListCount = 49;
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
gMenuListCount++;
|
||||||
|
#endif
|
||||||
#if defined(ENABLE_NOAA)
|
#if defined(ENABLE_NOAA)
|
||||||
gMenuListCount++;
|
gMenuListCount++;
|
||||||
#endif
|
#endif
|
||||||
|
4
misc.c
4
misc.c
@ -73,7 +73,9 @@ uint8_t gReducedService;
|
|||||||
uint8_t gBatteryVoltageIndex;
|
uint8_t gBatteryVoltageIndex;
|
||||||
CssScanMode_t gCssScanMode;
|
CssScanMode_t gCssScanMode;
|
||||||
bool gUpdateRSSI;
|
bool gUpdateRSSI;
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
AlarmState_t gAlarmState;
|
AlarmState_t gAlarmState;
|
||||||
|
#endif
|
||||||
uint8_t gVoltageMenuCountdown;
|
uint8_t gVoltageMenuCountdown;
|
||||||
bool gPttWasReleased;
|
bool gPttWasReleased;
|
||||||
bool gPttWasPressed;
|
bool gPttWasPressed;
|
||||||
@ -117,8 +119,10 @@ uint8_t gCurrentScanList;
|
|||||||
uint8_t gPreviousMrChannel;
|
uint8_t gPreviousMrChannel;
|
||||||
uint32_t gRestoreFrequency;
|
uint32_t gRestoreFrequency;
|
||||||
uint8_t gRxVfoIsActive;
|
uint8_t gRxVfoIsActive;
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
uint8_t gAlarmToneCounter;
|
uint8_t gAlarmToneCounter;
|
||||||
uint16_t gAlarmRunningCounter;
|
uint16_t gAlarmRunningCounter;
|
||||||
|
#endif
|
||||||
bool gKeyBeingHeld;
|
bool gKeyBeingHeld;
|
||||||
bool gPttIsPressed;
|
bool gPttIsPressed;
|
||||||
uint8_t gPttDebounceCounter;
|
uint8_t gPttDebounceCounter;
|
||||||
|
2
misc.h
2
misc.h
@ -168,8 +168,10 @@ extern uint8_t gCurrentScanList;
|
|||||||
extern uint8_t gPreviousMrChannel;
|
extern uint8_t gPreviousMrChannel;
|
||||||
extern uint32_t gRestoreFrequency;
|
extern uint32_t gRestoreFrequency;
|
||||||
extern uint8_t gRxVfoIsActive;
|
extern uint8_t gRxVfoIsActive;
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
extern uint8_t gAlarmToneCounter;
|
extern uint8_t gAlarmToneCounter;
|
||||||
extern uint16_t gAlarmRunningCounter;
|
extern uint16_t gAlarmRunningCounter;
|
||||||
|
#endif
|
||||||
extern bool gKeyBeingHeld;
|
extern bool gKeyBeingHeld;
|
||||||
extern bool gPttIsPressed;
|
extern bool gPttIsPressed;
|
||||||
extern uint8_t gPttDebounceCounter;
|
extern uint8_t gPttDebounceCounter;
|
||||||
|
19
radio.c
19
radio.c
@ -739,7 +739,18 @@ void RADIO_PrepareTX(void)
|
|||||||
gRxVfoIsActive = true;
|
gRxVfoIsActive = true;
|
||||||
}
|
}
|
||||||
RADIO_SelectCurrentVfo();
|
RADIO_SelectCurrentVfo();
|
||||||
if (gAlarmState == ALARM_STATE_OFF || gAlarmState == ALARM_STATE_TX1750 || (gAlarmState == ALARM_STATE_ALARM && gEeprom.ALARM_MODE == ALARM_MODE_TONE)) {
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
|
if (gAlarmState == ALARM_STATE_OFF
|
||||||
|
#if defined(ENABLE_TX1750)
|
||||||
|
|| gAlarmState == ALARM_STATE_TX1750
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
|| (gAlarmState == ALARM_STATE_ALARM && gEeprom.ALARM_MODE == ALARM_MODE_TONE)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
#else
|
||||||
|
if (1) {
|
||||||
|
#endif
|
||||||
VfoState_t State;
|
VfoState_t State;
|
||||||
|
|
||||||
if (!FREQUENCY_Check(gCurrentVfo)) {
|
if (!FREQUENCY_Check(gCurrentVfo)) {
|
||||||
@ -756,7 +767,9 @@ void RADIO_PrepareTX(void)
|
|||||||
State = VFO_STATE_TX_DISABLE;
|
State = VFO_STATE_TX_DISABLE;
|
||||||
}
|
}
|
||||||
RADIO_SetVfoState(State);
|
RADIO_SetVfoState(State);
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
gAlarmState = ALARM_STATE_OFF;
|
gAlarmState = ALARM_STATE_OFF;
|
||||||
|
#endif
|
||||||
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
||||||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||||
return;
|
return;
|
||||||
@ -774,11 +787,15 @@ Skip:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
FUNCTION_Select(FUNCTION_TRANSMIT);
|
FUNCTION_Select(FUNCTION_TRANSMIT);
|
||||||
|
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||||
if (gAlarmState == ALARM_STATE_OFF) {
|
if (gAlarmState == ALARM_STATE_OFF) {
|
||||||
gTxTimerCountdown = gEeprom.TX_TIMEOUT_TIMER * 120;
|
gTxTimerCountdown = gEeprom.TX_TIMEOUT_TIMER * 120;
|
||||||
} else {
|
} else {
|
||||||
gTxTimerCountdown = 0;
|
gTxTimerCountdown = 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
gTxTimerCountdown = gEeprom.TX_TIMEOUT_TIMER * 120;
|
||||||
|
#endif
|
||||||
gTxTimeoutReached = false;
|
gTxTimeoutReached = false;
|
||||||
gFlagEndTransmission = false;
|
gFlagEndTransmission = false;
|
||||||
gRTTECountdown = 0;
|
gRTTECountdown = 0;
|
||||||
|
@ -128,7 +128,11 @@ void SETTINGS_SaveSettings(void)
|
|||||||
|
|
||||||
EEPROM_WriteBuffer(0x0EA0, State);
|
EEPROM_WriteBuffer(0x0EA0, State);
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
State[0] = gEeprom.ALARM_MODE;
|
State[0] = gEeprom.ALARM_MODE;
|
||||||
|
#else
|
||||||
|
State[0] = 0xFF;
|
||||||
|
#endif
|
||||||
State[1] = gEeprom.ROGER;
|
State[1] = gEeprom.ROGER;
|
||||||
State[2] = gEeprom.REPEATER_TAIL_TONE_ELIMINATION;
|
State[2] = gEeprom.REPEATER_TAIL_TONE_ELIMINATION;
|
||||||
State[3] = gEeprom.TX_CHANNEL;
|
State[3] = gEeprom.TX_CHANNEL;
|
||||||
|
@ -130,9 +130,13 @@ void UI_DisplayMain(void)
|
|||||||
uint32_t SomeValue = 0;
|
uint32_t SomeValue = 0;
|
||||||
|
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
if (gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
if (gAlarmState == ALARM_STATE_ALARM) {
|
if (gAlarmState == ALARM_STATE_ALARM) {
|
||||||
SomeValue = 2;
|
SomeValue = 2;
|
||||||
} else {
|
} else {
|
||||||
|
#else
|
||||||
|
if (1) {
|
||||||
|
#endif
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
|
||||||
Channel = gEeprom.RX_CHANNEL;
|
Channel = gEeprom.RX_CHANNEL;
|
||||||
} else {
|
} else {
|
||||||
@ -181,6 +185,7 @@ void UI_DisplayMain(void)
|
|||||||
// 0x8FEC
|
// 0x8FEC
|
||||||
|
|
||||||
uint8_t State = VfoState[i];
|
uint8_t State = VfoState[i];
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT && gAlarmState == ALARM_STATE_ALARM) {
|
if (gCurrentFunction == FUNCTION_TRANSMIT && gAlarmState == ALARM_STATE_ALARM) {
|
||||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
|
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
|
||||||
Channel = gEeprom.RX_CHANNEL;
|
Channel = gEeprom.RX_CHANNEL;
|
||||||
@ -191,6 +196,7 @@ void UI_DisplayMain(void)
|
|||||||
State = VFO_STATE_ALARM;
|
State = VFO_STATE_ALARM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (State) {
|
if (State) {
|
||||||
uint8_t Width = 10;
|
uint8_t Width = 10;
|
||||||
|
|
||||||
@ -209,9 +215,11 @@ void UI_DisplayMain(void)
|
|||||||
case 4:
|
case 4:
|
||||||
strcpy(String, "TIMEOUT");
|
strcpy(String, "TIMEOUT");
|
||||||
break;
|
break;
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
case 5:
|
case 5:
|
||||||
strcpy(String, "ALARM");
|
strcpy(String, "ALARM");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case 6:
|
case 6:
|
||||||
sprintf(String, "VOL HIGH");
|
sprintf(String, "VOL HIGH");
|
||||||
Width = 8;
|
Width = 8;
|
||||||
|
10
ui/menu.c
10
ui/menu.c
@ -42,7 +42,11 @@ static const char MenuList[][7] = {
|
|||||||
"S-ADD1", "S-ADD2", "STE", "RP-STE",
|
"S-ADD1", "S-ADD2", "STE", "RP-STE",
|
||||||
"MIC", "1-CALL", "S-LIST", "SLIST1",
|
"MIC", "1-CALL", "S-LIST", "SLIST1",
|
||||||
// 0x20
|
// 0x20
|
||||||
"SLIST2", "AL-MOD", "ANI-ID", "UPCODE",
|
"SLIST2",
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
|
"AL-MOD",
|
||||||
|
#endif
|
||||||
|
"ANI-ID", "UPCODE",
|
||||||
"DWCODE", "D-ST", "D-RSP", "D-HOLD",
|
"DWCODE", "D-ST", "D-RSP", "D-HOLD",
|
||||||
// 0x28
|
// 0x28
|
||||||
"D-PRE", "PTT-ID", "D-DCD", "D-LIST",
|
"D-PRE", "PTT-ID", "D-DCD", "D-LIST",
|
||||||
@ -121,10 +125,12 @@ static const char gSubMenu_MDF[3][5] = {
|
|||||||
"NAME",
|
"NAME",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
static const char gSubMenu_AL_MOD[2][5] = {
|
static const char gSubMenu_AL_MOD[2][5] = {
|
||||||
"SITE",
|
"SITE",
|
||||||
"TONE",
|
"TONE",
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char gSubMenu_D_RSP[4][6] = {
|
static const char gSubMenu_D_RSP[4][6] = {
|
||||||
"NULL",
|
"NULL",
|
||||||
@ -353,9 +359,11 @@ void UI_DisplayMenu(void)
|
|||||||
sprintf(String, "LIST%d", gSubMenuSelection);
|
sprintf(String, "LIST%d", gSubMenuSelection);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if defined(ENABLE_ALARM)
|
||||||
case MENU_AL_MOD:
|
case MENU_AL_MOD:
|
||||||
sprintf(String, gSubMenu_AL_MOD[gSubMenuSelection]);
|
sprintf(String, gSubMenu_AL_MOD[gSubMenuSelection]);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_ANI_ID:
|
case MENU_ANI_ID:
|
||||||
strcpy(String, gEeprom.ANI_DTMF_ID);
|
strcpy(String, gEeprom.ANI_DTMF_ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user