Skip to content

Commit

Permalink
Продолжаем пилить
Browse files Browse the repository at this point in the history
  • Loading branch information
rebezhir committed Sep 10, 2023
1 parent f12b8e5 commit 55b45b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
1 change: 0 additions & 1 deletion app/dtmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#include <string.h>
#include "app/fm.h"
#include "app/scanner.h"
#include "bsp/dp32g030/gpio.h"
#include "driver/bk4819.h"
Expand Down
18 changes: 5 additions & 13 deletions app/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#include "app/app.h"
#include "app/fm.h"
#include "app/generic.h"
#include "app/scanner.h"
#include "audio.h"
Expand Down Expand Up @@ -52,7 +51,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
gRequestSaveSettings = true;
} else {
if ((gFmRadioMode || gScreenToDisplay != DISPLAY_MAIN) && gScreenToDisplay != DISPLAY_FM) {
if (gScreenToDisplay != DISPLAY_MAIN) {
return;
}
gWasFKeyPressed = !gWasFKeyPressed;
Expand All @@ -62,14 +61,10 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
gUpdateStatus = true;
}
} else {
if (gScreenToDisplay != DISPLAY_FM) {
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return;
}
if (gFM_ScanState == FM_SCAN_OFF) {
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
return;
}


gBeepToPlay = BEEP_440HZ_500MS;
gPttWasReleased = true;
}
Expand Down Expand Up @@ -110,7 +105,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
return;
}

if (gFM_ScanState == FM_SCAN_OFF) {

if (gCssScanMode == CSS_SCAN_MODE_OFF) {
if (gScreenToDisplay == DISPLAY_MENU || gScreenToDisplay == DISPLAY_FM) {
gRequestDisplayScreen = DISPLAY_MAIN;
Expand Down Expand Up @@ -161,10 +156,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
RADIO_StopCssScan();
gRequestDisplayScreen = DISPLAY_MENU;
}
} else {
FM_PlayAndUpdate();
gRequestDisplayScreen = DISPLAY_FM;
}

gAnotherVoiceID = VOICE_ID_SCANNING_STOP;
gPttWasPressed = true;
}
Expand Down
Binary file modified firmware.packed.bin
Binary file not shown.

0 comments on commit 55b45b3

Please sign in to comment.