diff --git a/am_fix.c b/am_fix.c index 838b3322e..dade2397d 100644 --- a/am_fix.c +++ b/am_fix.c @@ -30,6 +30,9 @@ #include "functions.h" #include "misc.h" #include "settings.h" +#ifdef ENABLE_AGC_SHOW_DATA +#include "ui/main.h" +#endif #ifdef ENABLE_AM_FIX @@ -359,6 +362,9 @@ void AM_fix_10ms(const unsigned vfo) gain_table_index_prev[vfo] = index; currentGainDiff = gain_table[0].gain_dB - gain_table[index].gain_dB; BK4819_WriteRegister(BK4819_REG_13, gain_table[index].reg_val); +#ifdef ENABLE_AGC_SHOW_DATA + UI_MAIN_PrintAGC(true); +#endif } #ifdef ENABLE_AM_FIX_SHOW_DATA diff --git a/ui/main.c b/ui/main.c index 0cdaf0077..d8688e9e4 100644 --- a/ui/main.c +++ b/ui/main.c @@ -248,7 +248,7 @@ void DisplayRSSIBar(const bool now) } #ifdef ENABLE_AGC_SHOW_DATA -static void PrintAGC(bool now) +void UI_MAIN_PrintAGC(bool now) { char buf[20]; memset(gFrameBuffer[3], 0, 128); @@ -290,7 +290,7 @@ void UI_MAIN_TimeSlice500ms(void) { if(gScreenToDisplay==DISPLAY_MAIN) { #ifdef ENABLE_AGC_SHOW_DATA - PrintAGC(true); + UI_MAIN_PrintAGC(true); return; #endif @@ -703,7 +703,7 @@ void UI_DisplayMain(void) #ifdef ENABLE_AGC_SHOW_DATA center_line = CENTER_LINE_IN_USE; - PrintAGC(false); + UI_MAIN_PrintAGC(false); #endif if (center_line == CENTER_LINE_NONE) diff --git a/ui/main.h b/ui/main.h index f651ec6b9..16a6ec333 100644 --- a/ui/main.h +++ b/ui/main.h @@ -42,4 +42,8 @@ void UI_DisplayAudioBar(void); void UI_MAIN_TimeSlice500ms(void); void UI_DisplayMain(void); +#ifdef ENABLE_AGC_SHOW_DATA +void UI_MAIN_PrintAGC(bool force); +#endif + #endif