Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
JuantAldea committed Jan 1, 2024
1 parent a05d5c1 commit 910ea8b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
10 changes: 5 additions & 5 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static void HandleIncoming(void)
return;

#ifdef ENABLE_DTMF_CALLING
if (gScanStateDir == SCAN_OFF && (gRxVfo->DTMF_DECODING_ENABLE || gSetting_KILLED)) {
if (gScanStateDir == SCAN_OFF && (gRxVfo->DTMF_DECODING_ENABLE || gSetting_DTMF_KILLED)) {

// DTMF DCD is enabled
DTMF_HandleRequest();
Expand Down Expand Up @@ -418,7 +418,7 @@ void APP_StartListening(FUNCTION_Type_t function)
const unsigned int vfo = gEeprom.RX_VFO;

#ifdef ENABLE_DTMF_CALLING
if (gSetting_KILLED)
if (gSetting_DTMF_KILLED)
return;
#endif

Expand Down Expand Up @@ -605,7 +605,7 @@ static void CheckRadioInterrupts(void)
}

#ifdef ENABLE_DTMF_CALLING
if (gRxVfo->DTMF_DECODING_ENABLE || gSetting_KILLED)
if (gRxVfo->DTMF_DECODING_ENABLE || gSetting_DTMF_KILLED)
{
if (gDTMF_RX_index >= (sizeof(gDTMF_RX) - 1))
{ // make room
Expand Down Expand Up @@ -724,7 +724,7 @@ void APP_EndTransmission(bool inmediately)
static void HandleVox(void)
{
#ifdef ENABLE_DTMF_CALLING
if (gSetting_KILLED)
if (gSetting_DTMF_KILLED)
return;
#endif

Expand Down Expand Up @@ -982,7 +982,7 @@ bool DebounceRead(uint8_t ReadValue, uint8_t *pDebounceCounter, uint8_t TargetVa
static void CheckKeys(void)
{
#ifdef ENABLE_DTMF_CALLING
if(gSetting_KILLED){
if(gSetting_DTMF_KILLED){
return;
}
#endif
Expand Down
8 changes: 4 additions & 4 deletions app/dtmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void DTMF_HandleRequest(void)
return;
}

if (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_KILLED)
if (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_DTMF_KILLED)
{ // D-DCD is disabled or we're alive
DTMF_clear_RX();
return;
Expand All @@ -360,7 +360,7 @@ void DTMF_HandleRequest(void)

if (gEeprom.PERMIT_REMOTE_KILL)
{
gSetting_KILLED = true; // oooerr !
gSetting_DTMF_KILLED = true; // oooerr !

DTMF_clear_RX();

Expand Down Expand Up @@ -399,7 +399,7 @@ void DTMF_HandleRequest(void)
if (CompareMessage(gDTMF_RX + Offset, String, strlen(String), true))
{ // shit, we're back !

gSetting_KILLED = false;
gSetting_DTMF_KILLED = false;

DTMF_clear_RX();

Expand Down Expand Up @@ -452,7 +452,7 @@ void DTMF_HandleRequest(void)
}
}

if (gSetting_KILLED || gDTMF_CallState != DTMF_CALL_STATE_NONE) {
if (gSetting_DTMF_KILLED || gDTMF_CallState != DTMF_CALL_STATE_NONE) {
// we've been killed or expecting a reply
return;
}
Expand Down
2 changes: 2 additions & 0 deletions app/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ void GENERIC_Key_PTT(bool bKeyPressed)
if (gCurrentFunction == FUNCTION_TRANSMIT) {
// we are transmitting .. stop
APP_EndTransmission(SerialConfigInProgress());
gUpdateStatus = true;
gUpdateDisplay = true;

#ifdef ENABLE_VOX
gVOX_NoiseDetected = false;
Expand Down
2 changes: 1 addition & 1 deletion misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool gSetting_live_DTMF_decoder;
const uint8_t DTMF_RX_timeout_500ms = 10000 / 500; // 10 seconds till we wipe the DTMF receiver
const uint8_t DTMF_decode_ring_countdown_500ms = 15000 / 500; // 15 seconds .. time we sound the ringing for
const uint8_t DTMF_txstop_countdown_500ms = 3000 / 500; // 6 seconds
bool gSetting_KILLED;
bool gSetting_DTMF_KILLED;
#endif

#endif
Expand Down
2 changes: 1 addition & 1 deletion misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extern bool gSetting_live_DTMF_decoder;
extern const uint8_t DTMF_RX_timeout_500ms;
extern const uint8_t DTMF_decode_ring_countdown_500ms;
extern const uint8_t DTMF_txstop_countdown_500ms;
extern bool gSetting_KILLED;
extern bool gSetting_DTMF_KILLED;
#endif

#endif
Expand Down
2 changes: 1 addition & 1 deletion radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ void RADIO_SetupRegisters(bool switchToForeground)

#ifdef ENABLE_DTMF
#if 0
if (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_KILLED)
if (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_DTMF_KILLED)
{
BK4819_DisableDTMF();
}
Expand Down
4 changes: 2 additions & 2 deletions settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void SETTINGS_InitEEPROM(void)
gSetting_F_LOCK = (Data[0] < F_LOCK_LEN) ? Data[0] : F_LOCK_DEF;
gSetting_350TX = (Data[1] < 2) ? Data[1] : false; // was true
#ifdef ENABLE_DTMF_CALLING
gSetting_KILLED = (Data[2] < 2) ? Data[2] : false;
gSetting_DTMF_KILLED = (Data[2] < 2) ? Data[2] : false;
#endif
gSetting_200TX = (Data[3] < 2) ? Data[3] : false;
gSetting_500TX = (Data[4] < 2) ? Data[4] : false;
Expand Down Expand Up @@ -583,7 +583,7 @@ void SETTINGS_SaveSettings(void)
State[0] = gSetting_F_LOCK;
State[1] = gSetting_350TX;
#ifdef ENABLE_DTMF_CALLING
State[2] = gSetting_KILLED;
State[2] = gSetting_DTMF_KILLED;
#endif
State[3] = gSetting_200TX;
State[4] = gSetting_500TX;
Expand Down
2 changes: 1 addition & 1 deletion ui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ void UI_DisplayMain(void)

#ifdef ENABLE_DTMF_CALLING
// show the DTMF decoding symbol
if (vfoInfo->DTMF_DECODING_ENABLE || gSetting_KILLED)
if (vfoInfo->DTMF_DECODING_ENABLE || gSetting_DTMF_KILLED)
UI_PrintStringSmallNormal("DTMF", LCD_WIDTH + 78, 0, line + 1);
#endif

Expand Down
2 changes: 1 addition & 1 deletion ui/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void UI_DisplayStatus()
#endif

#ifdef ENABLE_DTMF_CALLING
if (gSetting_KILLED) {
if (gSetting_DTMF_KILLED) {
memset(line + x, 0xFF, 10);
x1 = x + 10;
}
Expand Down

0 comments on commit 910ea8b

Please sign in to comment.