Skip to content

Commit

Permalink
Merge pull request #199 from dovandung/main
Browse files Browse the repository at this point in the history
Fix bug Issue #176 and FM audio better
  • Loading branch information
losehu authored Jan 26, 2025
2 parents b7564c2 + 1eda7da commit 0c9ee87
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/si.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static const char SI47XX_SSB_BW_NAMES[6][8] = {
static const char SI47XX_MODE_NAMES[5][4] = {
"FM", "AM", "LSB", "USB", "CW",
};

extern State previousState,currentState ;
static SI47XX_FilterBW bw = SI47XX_BW_6_kHz;
static SI47XX_SsbFilterBW ssbBw = SI47XX_SSB_BW_3_kHz;
static int8_t currentBandIndex = -1;
Expand Down Expand Up @@ -191,7 +191,9 @@ void SI_init() {


SI47XX_PowerUp();

// In FM mode need to reduce volume because audio output from SI in FM mode is higher another mode
if (si4732mode == SI47XX_FM)
setVolume(55);
SI47XX_SetAutomaticGainControl(att > 0, att);
}

Expand Down Expand Up @@ -606,5 +608,7 @@ void SI4732_Main() {
SYSTEM_DelayMs(1);
}
SI_deinit();

// fix a bug when in SI mode using key 5 to input a frequency , after that can not go to spectrum
if (currentState==FREQ_INPUT )
SetState(SPECTRUM);
}

0 comments on commit 0c9ee87

Please sign in to comment.