Skip to content

Commit

Permalink
fix: rxagc was not being loaded at boot, but only after first squelch…
Browse files Browse the repository at this point in the history
… open in main app
  • Loading branch information
kamilsss655 committed Jan 9, 2024
1 parent 910120d commit 684aea4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,6 @@ void APP_StartListening(FUNCTION_Type_t Function)
gUpdateStatus = true;
}

BK4819_InitAGC(gEeprom.RX_AGC, gTxVfo->Modulation);
BK4819_SetAGC(gEeprom.RX_AGC!=RX_AGC_OFF);

// AF gain - original QS values
// if (gRxVfo->Modulation != MODULATION_FM){
// BK4819_WriteRegister(BK4819_REG_48, 0xB3A8);
Expand Down
3 changes: 0 additions & 3 deletions driver/bk4819.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ void BK4819_Init(void)

BK4819_SetDefaultAmplifierSettings();

BK4819_InitAGC(gEeprom.RX_AGC, gTxVfo->Modulation);
BK4819_SetAGC(gEeprom.RX_AGC!=RX_AGC_OFF);

BK4819_WriteRegister(BK4819_REG_19, 0b0001000001000001); // <15> MIC AGC 1 = disable 0 = enable

BK4819_WriteRegister(BK4819_REG_7D, 0xE940);
Expand Down
3 changes: 3 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ void Main(void)

RADIO_SetupRegisters(true);

BK4819_InitAGC(gEeprom.RX_AGC, gTxVfo->Modulation);
BK4819_SetAGC(gEeprom.RX_AGC!=RX_AGC_OFF);

for (i = 0; i < ARRAY_SIZE(gBatteryVoltages); i++)
BOARD_ADC_GetBatteryInfo(&gBatteryVoltages[i], &gBatteryCurrent);

Expand Down
3 changes: 3 additions & 0 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure

pVfo->Compander = att.compander;

BK4819_InitAGC(gEeprom.RX_AGC, gTxVfo->Modulation);
BK4819_SetAGC(gEeprom.RX_AGC!=RX_AGC_OFF);

RADIO_ConfigureSquelchAndOutputPower(pVfo);
}

Expand Down

0 comments on commit 684aea4

Please sign in to comment.