Start implementing ack
All checks were successful
Build Firmware / build (push) Successful in 1m1s

This commit is contained in:
2025-04-01 14:47:18 +02:00
parent 0ea8767a8b
commit 7b1d31fdef
7 changed files with 110 additions and 47 deletions

View File

@@ -555,7 +555,7 @@ uint32_t APP_SetFreqByStepAndLimits(VFO_Info_t *pInfo, int8_t direction, uint32_
#ifdef ENABLE_FEAT_F4HWN
if (Frequency > upper)
#else
if (Frequency >= upper)
if (Frequency >= upper)
#endif
Frequency = lower;
@@ -1135,10 +1135,9 @@ static void CheckKeys(void) {
gPttDebounceCounter = 0;
}
#else
if (gPttIsPressed)
{
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || SerialConfigInProgress())
{ // PTT released or serial comms config in progress
if (gPttIsPressed) {
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) ||
SerialConfigInProgress()) { // PTT released or serial comms config in progress
if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms
{ // stop transmitting
ProcessKey(KEY_PTT, false, false);
@@ -1146,21 +1145,17 @@ static void CheckKeys(void) {
if (gKeyReading1 != KEY_INVALID)
gPttWasReleased = true;
}
}
else
} else
gPttDebounceCounter = 0;
}
else if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) && !SerialConfigInProgress())
{ // PTT pressed
} else if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) && !SerialConfigInProgress()) { // PTT pressed
if (++gPttDebounceCounter >= 3) // 30ms
{ // start transmitting
boot_counter_10ms = 0;
boot_counter_10ms = 0;
gPttDebounceCounter = 0;
gPttIsPressed = true;
gPttIsPressed = true;
ProcessKey(KEY_PTT, true, false);
}
}
else
} else
gPttDebounceCounter = 0;
#endif
@@ -1600,7 +1595,7 @@ void APP_TimeSlice500ms(void) {
#endif
if (disp == DISPLAY_INVALID
#ifdef ENABLE_NO_CODE_SCAN_TIMEOUT
#ifdef ENABLE_NO_CODE_SCAN_TIMEOUT
&& !SCANNER_IsScanning()
#endif
) {
@@ -1626,6 +1621,8 @@ void APP_TimeSlice500ms(void) {
BATTERY_TimeSlice500ms();
SCANNER_TimeSlice500ms();
MESSAGES_TimeSlice500ms();
FSKModem_TimeSlice500ms();
UI_MAIN_TimeSlice500ms();
#ifdef ENABLE_DTMF_CALLING
@@ -1856,7 +1853,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
#ifdef ENABLE_FEAT_F4HWN // For F + SIDE1 or F + SIDE2
if (gWasFKeyPressed && (Key == KEY_PTT || Key == KEY_EXIT)) {
#else
if (gWasFKeyPressed && (Key == KEY_PTT || Key == KEY_EXIT || Key == KEY_SIDE1 || Key == KEY_SIDE2)) {
if (gWasFKeyPressed && (Key == KEY_PTT || Key == KEY_EXIT || Key == KEY_SIDE1 || Key == KEY_SIDE2)) {
#endif
// cancel the F-key
gWasFKeyPressed = false;
@@ -1896,7 +1893,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
BK4819_ExitDTMF_TX(false);
BK4819_SetScramble(gCurrentVfo->SCRAMBLING_TYPE);
BK4819_SetScramble(gCurrentVfo->SCRAMBLING_TYPE);
}
} else {
@@ -1930,15 +1927,15 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
#endif
}
#ifdef ENABLE_FEAT_F4HWN // For F + SIDE1 or F + SIDE2
else if (gWasFKeyPressed && (Key == KEY_SIDE1 || Key == KEY_SIDE2)) {
ProcessKeysFunctions[gScreenToDisplay](Key, bKeyPressed, bKeyHeld);
} else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && gScreenToDisplay != DISPLAY_INVALID) {
ProcessKeysFunctions[gScreenToDisplay](Key, bKeyPressed, bKeyHeld);
}
#else
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && gScreenToDisplay != DISPLAY_INVALID) {
else if (gWasFKeyPressed && (Key == KEY_SIDE1 || Key == KEY_SIDE2)) {
ProcessKeysFunctions[gScreenToDisplay](Key, bKeyPressed, bKeyHeld);
} else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && gScreenToDisplay != DISPLAY_INVALID) {
ProcessKeysFunctions[gScreenToDisplay](Key, bKeyPressed, bKeyHeld);
}
#else
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && gScreenToDisplay != DISPLAY_INVALID) {
ProcessKeysFunctions[gScreenToDisplay](Key, bKeyPressed, bKeyHeld);
}
#endif
else if (!SCANNER_IsScanning()
#ifdef ENABLE_AIRCOPY