Skip to content

Commit

Permalink
AM-fix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Dec 7, 2023
1 parent 13c17ad commit 5e78916
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions am_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion am_fix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions app/spectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e78916

Please sign in to comment.