Skip to content

Commit

Permalink
Renamed lots more
Browse files Browse the repository at this point in the history
  • Loading branch information
OneOfEleven committed Oct 8, 2023
1 parent 1ab74dc commit 0bb34d2
Show file tree
Hide file tree
Showing 68 changed files with 3,746 additions and 3,763 deletions.
24 changes: 12 additions & 12 deletions am_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@

#ifdef ENABLE_AM_FIX_TEST1
// user manually sets the table index .. used to calibrate the desired dB gain table
unsigned int gain_table_index[2] = {1 + gSetting_AM_fix_test1, 1 + gSetting_AM_fix_test1};
unsigned int gain_table_index[2] = {1 + g_setting_am_fix_test1, 1 + g_setting_am_fix_test1};
#else
unsigned int gain_table_index[2] = {original_index, original_index};
#endif
Expand Down Expand Up @@ -256,7 +256,7 @@
for (i = 0; i < 2; i++)
{
#ifdef ENABLE_AM_FIX_TEST1
gain_table_index[i] = 1 + gSetting_AM_fix_test1;
gain_table_index[i] = 1 + g_setting_am_fix_test1;
#else
gain_table_index[i] = original_index; // re-start with original QS setting
#endif
Expand Down Expand Up @@ -293,7 +293,7 @@
rssi_gain_diff[vfo] = 0;

#ifdef ENABLE_AM_FIX_TEST1
// gain_table_index[vfo] = 1 + gSetting_AM_fix_test1;
// gain_table_index[vfo] = 1 + g_setting_am_fix_test1;
#else
// gain_table_index[vfo] = original_index; // re-start with original QS setting
#endif
Expand All @@ -313,7 +313,7 @@
int16_t diff_dB;
int16_t rssi;

switch (gCurrentFunction)
switch (g_current_function)
{
case FUNCTION_TRANSMIT:
case FUNCTION_BAND_SCOPE:
Expand All @@ -337,7 +337,7 @@
if (++counter >= display_update_rate)
{ // trigger a display update
counter = 0;
gUpdateDisplay = true;
g_update_display = true;
}
}
#endif
Expand All @@ -353,26 +353,26 @@
#ifdef ENABLE_AM_FIX_SHOW_DATA
{
const int16_t new_rssi = rssi - rssi_gain_diff[vfo];
if (gCurrentRSSI[vfo] != new_rssi)
if (g_current_rssi[vfo] != new_rssi)
{
gCurrentRSSI[vfo] = new_rssi;
g_current_rssi[vfo] = new_rssi;

if (counter == 0)
{ // trigger a display update
counter = 1;
gUpdateDisplay = true;
g_update_display = true;
}
}
}
#else
gCurrentRSSI[vfo] = rssi - rssi_gain_diff[vfo];
g_current_rssi[vfo] = rssi - rssi_gain_diff[vfo];
#endif

#ifdef ENABLE_AM_FIX_TEST1
// user is manually adjusting a gain register - don't do anything automatically

{
int i = 1 + (int)gSetting_AM_fix_test1;
int i = 1 + (int)g_setting_am_fix_test1;
i = (i < 1) ? 1 : (i > ((int)ARRAY_SIZE(gain_table) - 1) ? ARRAY_SIZE(gain_table) - 1 : i;

if (gain_table_index[vfo] == i)
Expand Down Expand Up @@ -460,13 +460,13 @@
}

// save the corrected RSSI level
gCurrentRSSI[vfo] = rssi - rssi_gain_diff[vfo];
g_current_rssi[vfo] = rssi - rssi_gain_diff[vfo];

#ifdef ENABLE_AM_FIX_SHOW_DATA
if (counter == 0)
{
counter = 1;
gUpdateDisplay = true;
g_update_display = true;
}
#endif
}
Expand Down
Loading

0 comments on commit 0bb34d2

Please sign in to comment.