mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
1750Hz tone side key now a momentary action (press to TX tone, release to stop TX tone)
This commit is contained in:
parent
6e2ba5c214
commit
eaccdab1d4
2
Makefile
2
Makefile
@ -12,7 +12,7 @@ ENABLE_FMRADIO := 0
|
||||
ENABLE_NOAA := 0
|
||||
ENABLE_VOICE := 0
|
||||
ENABLE_ALARM := 0
|
||||
ENABLE_TX1750 := 0
|
||||
ENABLE_TX1750 := 1
|
||||
ENABLE_BIG_FREQ := 0
|
||||
ENABLE_SMALL_BOLD := 1
|
||||
ENABLE_KEEP_MEM_NAME := 1
|
||||
|
@ -236,7 +236,7 @@ void ACTION_Vox(void)
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
static void ACTION_AlarmOr1750(bool b1750)
|
||||
static void ACTION_AlarmOr1750(const bool b1750)
|
||||
{
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
@ -252,7 +252,7 @@ void ACTION_Vox(void)
|
||||
|
||||
gFlagPrepareTX = true;
|
||||
|
||||
// if (gScreenToDisplay != DISPLAY_MENU) // 1of11 .. don't close the menu
|
||||
if (gScreenToDisplay != DISPLAY_MENU) // 1of11 .. don't close the menu
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
}
|
||||
#endif
|
||||
|
@ -2262,10 +2262,12 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
else
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
if ((!bKeyHeld && bKeyPressed) || (gAlarmState == ALARM_STATE_TX1750 && bKeyHeld && !bKeyPressed))
|
||||
{
|
||||
ALARM_Off();
|
||||
|
||||
// TODO: fix side key 1750, you have to press it twice to restart the tone :(
|
||||
|
||||
if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
|
||||
{
|
||||
//if (gCurrentFunction != FUNCTION_FOREGROUND)
|
||||
@ -2278,6 +2280,8 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
gPttWasPressed = true;
|
||||
else
|
||||
gPttWasReleased = true;
|
||||
|
||||
bKeyHeld = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -89,6 +89,11 @@ center_line_t center_line = CENTER_LINE_NONE;
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
if (gAlarmState != ALARM_STATE_OFF)
|
||||
return;
|
||||
#endif
|
||||
|
||||
const unsigned int voice_amp = BK4819_GetVoiceAmplitudeOut(); // 15:0
|
||||
|
||||
// const unsigned int max = 65535;
|
||||
|
Loading…
x
Reference in New Issue
Block a user