forked from egzumer/uv-k5-firmware-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3db38e
commit 621c49d
Showing
8 changed files
with
86 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750) | ||
static void ACTION_AlarmOr1750(const bool b1750) | ||
{ | ||
|
||
#if defined(ENABLE_ALARM) | ||
const AlarmState_t alarm_mode = (gEeprom.ALARM_MODE == ALARM_MODE_TONE) ? ALARM_STATE_TXALARM : ALARM_STATE_SITE_ALARM; | ||
gAlarmRunningCounter = 0; | ||
#endif | ||
|
||
#if defined(ENABLE_ALARM) && defined(ENABLE_TX1750) | ||
gAlarmState = b1750 ? ALARM_STATE_TX1750 : alarm_mode; | ||
#elif defined(ENABLE_ALARM) | ||
gAlarmState = alarm_mode; | ||
#else | ||
gAlarmState = ALARM_STATE_TX1750; | ||
#endif | ||
|
||
(void)b1750; | ||
gInputBoxIndex = 0; | ||
|
||
gFlagPrepareTX = gAlarmState != ALARM_STATE_OFF; | ||
|
||
if (gScreenToDisplay != DISPLAY_MENU) // 1of11 .. don't close the menu | ||
gRequestDisplayScreen = DISPLAY_MAIN; | ||
} | ||
|
||
|
||
static void ALARM_Off(void) | ||
{ | ||
AUDIO_AudioPathOff(); | ||
gEnableSpeaker = false; | ||
|
||
if (gAlarmState == ALARM_STATE_TXALARM) { | ||
RADIO_SendEndOfTransmission(); | ||
RADIO_EnableCxCSS(); | ||
} | ||
|
||
gAlarmState = ALARM_STATE_OFF; | ||
|
||
#ifdef ENABLE_VOX | ||
gVoxResumeCountdown = 80; | ||
#endif | ||
|
||
SYSTEM_DelayMs(5); | ||
|
||
RADIO_SetupRegisters(true); | ||
|
||
if (gScreenToDisplay != DISPLAY_MENU) // 1of11 .. don't close the menu | ||
gRequestDisplayScreen = DISPLAY_MAIN; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750) | ||
|
||
static void ACTION_AlarmOr1750(bool b1750); | ||
inline static void ACTION_Alarm() { ACTION_AlarmOr1750(false); } | ||
inline static void ACTION_1750() { ACTION_AlarmOr1750(true); }; | ||
|
||
|
||
|
||
static void ACTION_AlarmOr1750(const bool b1750); | ||
static void ALARM_Off(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters