diff --git a/am_fix.c b/am_fix.c index c8dda0036..c3de4b2fc 100644 --- a/am_fix.c +++ b/am_fix.c @@ -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: diff --git a/am_fix.h b/am_fix.h index 562aec473..db8f31ed6 100644 --- a/am_fix.h +++ b/am_fix.h @@ -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 diff --git a/app/app.c b/app/app.c index de6d87a58..20d0cbbf0 100644 --- a/app/app.c +++ b/app/app.c @@ -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()) diff --git a/app/spectrum.c b/app/spectrum.c index e3c111d05..4efc9d768 100644 --- a/app/spectrum.c +++ b/app/spectrum.c @@ -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