Skip to content

Commit

Permalink
Faster AGC debugging print
Browse files Browse the repository at this point in the history
  • Loading branch information
egzumer committed Dec 25, 2023
1 parent cbf4a7c commit 38ec40b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions am_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions ui/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 38ec40b

Please sign in to comment.