Skip to content

Commit 692c862

Browse files
committed
Load actual setting, not just the defaulted 0
1 parent c171362 commit 692c862

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ubitx_si5351.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ uint32_t si5351bx_vcoa = (SI5351BX_XTAL*SI5351BX_MSA); // 25mhzXtal calibrate
4949
uint8_t si5351bx_rdiv = 0; // 0-7, CLK pin sees fout/(2**rdiv)
5050
uint8_t si5351bx_drive[3] = {3, 3, 3}; // 0=2ma 1=4ma 2=6ma 3=8ma for CLK 0,1,2
5151
uint8_t si5351bx_clken = 0xFF; // Private, all CLK output drivers off
52-
int32_t calibration = 0;
5352

5453
void i2cWrite(uint8_t reg, uint8_t val) { // write reg via i2c
5554
Wire.beginTransmission(SI5351BX_ADDR);
@@ -122,8 +121,7 @@ void si5351_set_calibration(int32_t cal){
122121
void initOscillators(){
123122
//initialize the SI5351
124123
si5351bx_init();
125-
si5351bx_vcoa = (SI5351BX_XTAL * SI5351BX_MSA) + calibration; // apply the calibration correction factor
126-
si5351bx_setfreq(0, globalSettings.usbCarrierFreq);
124+
si5351_set_calibration(globalSettings.oscillatorCal);
127125
}
128126

129127

0 commit comments

Comments
 (0)