0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-29 23:01:26 +03:00

clean ups

This commit is contained in:
OneOfEleven 2023-09-10 18:11:25 +01:00
parent 50a55e34ab
commit 7dc3512a50
5 changed files with 56 additions and 57 deletions

View File

@ -17,18 +17,19 @@ You can edit those changes by (currently) editing the MakeFile, look for these l
* CFLAGS += -DKEEP_MEM_NAME .. maintain the memory channel's name when re-saving the memory channel * CFLAGS += -DKEEP_MEM_NAME .. maintain the memory channel's name when re-saving the memory channel
* CFLAGS += -DDISABLE_ALARM .. remove the ALARM transmit option from the firmware * CFLAGS += -DDISABLE_ALARM .. remove the ALARM transmit option from the firmware
* CFLAGS += -DCHAN_NAME_FREQ .. show the channel frequency (as well as channel number/name) * CFLAGS += -DCHAN_NAME_FREQ .. show the channel frequency (as well as channel number/name)
* CFLAGS += -DSINGLE_VFO_CHAN .. only show a single VFO/CHANNEL if dual watch is disabled * CFLAGS += -DSINGLE_VFO_CHAN .. not yet implemented .. only show a single VFO/CHANNEL if dual watch is disabled
* #CFLAGS += -DBAND_SCOPE .. not yet implemented * #CFLAGS += -DBAND_SCOPE .. not yet implemented
To enable the custom option just uncomment the line by removing the starting '#'. To enable the custom option just uncomment the line by removing the starting '#'.
# Other changes made # Other changes made
* Battery voltage boot screen now includes the percentage (as well as voltage). * Various bugs fixed that the QS firmware had (TX tail, Menu confimation etc)
* Slightly less intense menu style. * Battery voltage boot screen now includes the percentage (as well as voltage)
* AM RX allowed everywhere. Although the radio really doesn't do AM, the adverts are a con ! * Slightly less intense menu style
* AM RX now allowed everywhere, although the radio really doesn't do AM, the adverts are a con !
* Finer RSSI bar steps * Finer RSSI bar steps
*
* "MEM-CH" and "DEL-CH" menus now include channel name * "MEM-CH" and "DEL-CH" menus now include channel name
* "STEP" menu, added 1.25kHz option, removed 5kHz option * "STEP" menu, added 1.25kHz option, removed 5kHz option
* "TXP" menu, renamed to "TX-PWR" * "TXP" menu, renamed to "TX-PWR"

View File

@ -905,10 +905,10 @@ void APP_Update(void)
} }
} }
// called every 10ms
void APP_CheckKeys(void) void APP_CheckKeys(void)
{ {
const uint16_t key_repeat_delay = 70; // 700ms const uint16_t key_repeat_delay = 70; // 700ms
KEY_Code_t Key; KEY_Code_t Key;
#ifndef DISABLE_AIRCOPY #ifndef DISABLE_AIRCOPY
@ -925,20 +925,20 @@ void APP_CheckKeys(void)
{ // PTT released { // PTT released
// denoise the PTT // denoise the PTT
unsigned int i = 4; // loop for 4ms unsigned int i = 6; // test the PTT button for 6ms
unsigned int count = 0; unsigned int count = 0;
while (i-- > 0) while (i-- > 0)
{ {
SYSTEM_DelayMs(1); SYSTEM_DelayMs(1);
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT)) if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
count++; count++; // PTT still released
else else
if (count > 0) if (count > 0)
count--; count--; // no it's not
} }
if (count >= 2) if (count >= 3)
{ { // good enough to end transmission
APP_ProcessKey(KEY_PTT, false, false); APP_ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false; gPttIsPressed = false;
if (gKeyReading1 != KEY_INVALID) if (gKeyReading1 != KEY_INVALID)
@ -947,18 +947,16 @@ void APP_CheckKeys(void)
} }
} }
else else
{
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT)) if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
{ { // PTT pressed
if (++gPttDebounceCounter >= 4) // 40ms if (++gPttDebounceCounter >= 4) // 40ms
{ { // lets start transmitting
gPttIsPressed = true; gPttIsPressed = true;
APP_ProcessKey(KEY_PTT, true, false); APP_ProcessKey(KEY_PTT, true, false);
} }
} }
else else
gPttDebounceCounter = 0; gPttDebounceCounter = 0;
}
Key = KEYBOARD_Poll(); Key = KEYBOARD_Poll();

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.