Skip to content

Commit

Permalink
Merge pull request #117 from kamilsss655/rc20.2
Browse files Browse the repository at this point in the history
Rc20.2
  • Loading branch information
kamilsss655 committed Jan 31, 2024
2 parents 8333de6 + 229806d commit eaadce9
Show file tree
Hide file tree
Showing 21 changed files with 169 additions and 177 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ endif
CFLAGS =
ifeq ($(ENABLE_CLANG),0)
# Highest optimization settings (possible breaking changes):
CFLAGS += -Oz -mcpu=cortex-m0 -fno-delete-null-pointer-checks -std=c11 -MMD
CFLAGS += -Oz -Wall -Werror -mcpu=cortex-m0 -fno-delete-null-pointer-checks -std=c11 -MMD
# Standard settings:
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c99 -MMD
Expand Down
37 changes: 12 additions & 25 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
#ifdef ENABLE_MESSENGER
#include "app/messenger.h"
#endif
#ifdef ENABLE_ENCRYPTION
#include "helper/crypto.h"
#endif

#ifdef ENABLE_MESSENGER_NOTIFICATION
bool gPlayMSGRing = false;
Expand Down Expand Up @@ -786,14 +789,7 @@ void APP_EndTransmission(bool playRoger)
else
{
APP_EndTransmission(true);

if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
{
//if (gCurrentFunction != FUNCTION_FOREGROUND)
FUNCTION_Select(FUNCTION_FOREGROUND);
}
else
gRTTECountdown = gEeprom.REPEATER_TAIL_TONE_ELIMINATION * 10;
FUNCTION_Select(FUNCTION_FOREGROUND);
}

gUpdateStatus = true;
Expand Down Expand Up @@ -1239,19 +1235,6 @@ void APP_TimeSlice10ms(void)
}
}
#endif

// repeater tail tone elimination
if (gRTTECountdown > 0)
{
if (--gRTTECountdown == 0)
{
//if (gCurrentFunction != FUNCTION_FOREGROUND)
FUNCTION_Select(FUNCTION_FOREGROUND);

gUpdateStatus = true;
gUpdateDisplay = true;
}
}
}

#ifdef ENABLE_FMRADIO
Expand Down Expand Up @@ -1329,6 +1312,13 @@ void APP_TimeSlice500ms(void)
} else if (hasNewMessage == 2) {
hasNewMessage = 1;
}
}
#endif

#ifdef ENABLE_ENCRYPTION
if(gRecalculateEncKey){
CRYPTO_Generate256BitKey(gEeprom.ENC_KEY, gEncryptionKey, sizeof(gEeprom.ENC_KEY));
gRecalculateEncKey = false;
}
#endif

Expand Down Expand Up @@ -1865,10 +1855,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
ALARM_Off();

if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
FUNCTION_Select(FUNCTION_FOREGROUND);
else
gRTTECountdown = gEeprom.REPEATER_TAIL_TONE_ELIMINATION * 10;
FUNCTION_Select(FUNCTION_FOREGROUND);

if (Key == KEY_PTT)
gPttWasPressed = true;
Expand Down
8 changes: 2 additions & 6 deletions app/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
else
{
APP_EndTransmission(true);

if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
FUNCTION_Select(FUNCTION_FOREGROUND);
else
gRTTECountdown = gEeprom.REPEATER_TAIL_TONE_ELIMINATION * 10;
FUNCTION_Select(FUNCTION_FOREGROUND);
}

gFlagEndTransmission = false;
Expand Down Expand Up @@ -165,7 +161,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
goto start_tx; // listening to the FM radio .. start TX'ing
#endif

if (gCurrentFunction == FUNCTION_TRANSMIT && gRTTECountdown == 0)
if (gCurrentFunction == FUNCTION_TRANSMIT)
{ // already transmitting
gInputBoxIndex = 0;
return;
Expand Down
13 changes: 0 additions & 13 deletions app/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
case MENU_VOX:
case MENU_VOX_DELAY:
#endif
case MENU_RP_STE:
*pMin = 0;
*pMax = 10;
break;

case MENU_MEM_CH:
case MENU_1_CALL:
case MENU_DEL_CH:
Expand Down Expand Up @@ -630,10 +625,6 @@ void MENU_AcceptSetting(void)
gFlagResetVfos = true;
return;

case MENU_RP_STE:
gEeprom.REPEATER_TAIL_TONE_ELIMINATION = gSubMenuSelection;
break;

case MENU_MIC:
gEeprom.MIC_SENSITIVITY = gSubMenuSelection;
BOARD_EEPROM_LoadCalibration();
Expand Down Expand Up @@ -1019,10 +1010,6 @@ void MENU_ShowCurrentSetting(void)
gSubMenuSelection = gTxVfo->SCANLIST2_PARTICIPATION;
break;

case MENU_RP_STE:
gSubMenuSelection = gEeprom.REPEATER_TAIL_TONE_ELIMINATION;
break;

case MENU_MIC:
gSubMenuSelection = gEeprom.MIC_SENSITIVITY;
break;
Expand Down
Loading

0 comments on commit eaadce9

Please sign in to comment.