Little tidy-ups

This commit is contained in:
OneOfEleven 2023-09-18 13:31:56 +01:00
parent c23d21bcf1
commit 1610daaf01
6 changed files with 14 additions and 13 deletions

View File

@ -27,7 +27,7 @@ ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though fronte
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method
ENABLE_MAIN_KEY_HOLD := 1 initial F-key press not needed, instead hold down keys 0-9
ENABLE_BOOT_BEEPS := 1 give user audio feedback on volume knob position at boot-up
ENABLE_BOOT_BEEPS := 0 give user audio feedback on volume knob position at boot-up
ENABLE_DTMF_DECODER := 1 live on-screen DTMF decoder
ENABLE_COMPANDER := 1 compander option - setting not yet saved
#ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible

View File

@ -1201,7 +1201,7 @@ void APP_CheckKeys(void)
Key = KEYBOARD_Poll();
if (Key != KEY_INVALID)
boot_counter_10ms = 0; // cancel bbot beeps if any key pressed
boot_counter_10ms = 0; // cancel boot screen/beeps if any key pressed
if (gKeyReading0 != Key)
{ // new key pressed
@ -1847,17 +1847,10 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// const bool backlight_was_on = (gBacklightCountdown > 0 || gEeprom.BACKLIGHT >= 5);
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
if (Key != KEY_PTT &&
Key != KEY_F &&
bKeyPressed &&
!bKeyHeld &&
!backlight_was_on)
if (Key == KEY_EXIT && !backlight_was_on)
{ // just turn the light on for now
BACKLIGHT_TurnOn();
// gKeyReading0 = KEY_INVALID;
// gKeyReading1 = KEY_INVALID;
gDebounceCounter = 0;
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
gBeepToPlay = BEEP_NONE;
return;
}
@ -1871,7 +1864,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
#ifdef ENABLE_DTMF_DECODER
if (Key == KEY_EXIT && bKeyPressed && bKeyHeld && gDTMF_ReceivedSaved[0] > 0)
{ // clear the live DTMF RX if the EXIT key is held
{ // clear the live DTMF decoder if the EXIT key is held
gDTMF_RecvTimeoutSaved = 0;
gDTMF_ReceivedSaved[0] = '\0';
gUpdateDisplay = true;
@ -2152,7 +2145,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
}
Skip:
if (gBeepToPlay)
if (gBeepToPlay != BEEP_NONE)
{
AUDIO_PlayBeep(gBeepToPlay);
gBeepToPlay = BEEP_NONE;

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -12,6 +12,14 @@ del /S /Q *.bin >nul 2>nul
del /S /Q *.o >nul 2>nul
del /S /Q *.d >nul 2>nul
:: If you have python installed, you can create a 'packed' .bin from the compiled firmware.bin file.
:: The Quangsheng windows upload-to-radio program requires a 'packed' .bin file.
::
:: if you don't have python installed, then comment out the python line below, in which case you'll need
:: to upload the standard firmware.bin file another way.
:: I wrote a windows version of k5prog to do this easily in windows ..
:: https://github.com/OneOfEleven/k5prog-win
::
::python -m pip install --upgrade pip crcmod
fw-pack.py firmware.bin 230918 firmware.packed.bin