AM-fix cleanup

This commit is contained in:
Krzysiek Egzmont
2023-12-07 21:08:12 +01:00
parent 13c17ad073
commit 5e78916dd3
4 changed files with 6 additions and 6 deletions

View File

@@ -303,12 +303,12 @@ void AM_fix_reset(const unsigned vfo)
// won't/don't do it for itself, we're left to bodging it ourself by
// playing with the RF front end gain setting
//
void AM_fix_10ms(const unsigned vfo, bool force)
void AM_fix_10ms(const unsigned vfo)
{
if(!gSetting_AM_fix || !enabled || vfo > 1 )
return;
if(!force) switch (gCurrentFunction)
switch (gCurrentFunction)
{
case FUNCTION_TRANSMIT:
case FUNCTION_BAND_SCOPE:

View File

@@ -23,7 +23,7 @@
#ifdef ENABLE_AM_FIX
void AM_fix_init(void);
void AM_fix_reset(const unsigned vfo);
void AM_fix_10ms(const unsigned vfo, bool force);
void AM_fix_10ms(const unsigned vfo);
#ifdef ENABLE_AM_FIX_SHOW_DATA
void AM_fix_print_data(const unsigned vfo, char *s);
#endif

View File

@@ -1128,7 +1128,7 @@ void APP_TimeSlice10ms(void)
#ifdef ENABLE_AM_FIX
if (gRxVfo->Modulation == MODULATION_AM)
AM_fix_10ms(gEeprom.RX_VFO, false);
AM_fix_10ms(gEeprom.RX_VFO);
#endif
if (UART_IsCommandAvailable())

View File

@@ -1128,8 +1128,8 @@ static void Tick() {
#ifdef ENABLE_AM_FIX
if (gNextTimeslice) {
gNextTimeslice = false;
if(settings.modulationType == MODULATION_AM) {
AM_fix_10ms(vfo, !lockAGC); //allow AM_Fix to apply its AGC action
if(settings.modulationType == MODULATION_AM && !lockAGC) {
AM_fix_10ms(vfo); //allow AM_Fix to apply its AGC action
}
}
#endif