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

Adding compander

This commit is contained in:
OneOfEleven
2023-09-15 10:57:26 +01:00
parent 2fe8cd3757
commit cc36482580
16 changed files with 113 additions and 32 deletions

View File

@@ -56,7 +56,8 @@ void ACTION_Power(void)
if (++gTxVfo->OUTPUT_POWER > OUTPUT_POWER_HIGH)
gTxVfo->OUTPUT_POWER = OUTPUT_POWER_LOW;
gRequestSaveChannel = 1;
//gRequestSaveChannel = 1;
gRequestSaveChannel = 2; // TODO: fix me
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_POWER;
@@ -77,8 +78,8 @@ static void ACTION_Monitor(void)
#endif
RADIO_SetupRegisters(true);
APP_StartListening(FUNCTION_MONITOR);
APP_StartListening(FUNCTION_MONITOR);
return;
}

View File

@@ -33,6 +33,9 @@
#include "ui/inputbox.h"
#include "ui/ui.h"
// TEST ONLY
#include "driver/bk4819.h"
//#ifndef ARRAY_SIZE
// #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
//#endif

View File

@@ -187,6 +187,9 @@ int MENU_GetLimits(uint8_t Cursor, uint8_t *pMin, uint8_t *pMax)
*pMax = 50;
break;
#ifdef ENABLE_COMPANDER
case MENU_COMPAND:
#endif
case MENU_W_N:
case MENU_BCL:
case MENU_BEEP:
@@ -495,6 +498,13 @@ void MENU_AcceptSetting(void)
gFlagReconfigureVfos = true;
return;
#ifdef ENABLE_COMPANDER
case MENU_COMPAND:
gTxVfo->Compander = gSubMenuSelection;
//gRequestSaveChannel = 2;
return;
#endif
case MENU_1_CALL:
gEeprom.CHAN_1_CALL = gSubMenuSelection;
break;
@@ -821,6 +831,12 @@ void MENU_ShowCurrentSetting(void)
gSubMenuSelection = gEeprom.MIC_SENSITIVITY;
break;
#ifdef ENABLE_COMPANDER
case MENU_COMPAND:
gSubMenuSelection = gTxVfo->Compander;
return;
#endif
case MENU_1_CALL:
gSubMenuSelection = gEeprom.CHAN_1_CALL;
break;