File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -274,14 +274,14 @@ float LoRaClass::packetSnr()
274
274
long LoRaClass::packetFrequencyError ()
275
275
{
276
276
int32_t freqError = 0 ;
277
- freqError = static_cast <int32_t >(readRegister (REG_FREQ_ERROR_MSB) & B111 );
277
+ freqError = static_cast <int32_t >(readRegister (REG_FREQ_ERROR_MSB) & 0b111 );
278
278
freqError <<= 8L ;
279
279
freqError += static_cast <int32_t >(readRegister (REG_FREQ_ERROR_MID));
280
280
freqError <<= 8L ;
281
281
freqError += static_cast <int32_t >(readRegister (REG_FREQ_ERROR_LSB));
282
282
283
- if (readRegister (REG_FREQ_ERROR_MSB) & B1000 ) { // Sign bit is on
284
- freqError -= 524288 ; // B1000 '0000'0000'0000'0000
283
+ if (readRegister (REG_FREQ_ERROR_MSB) & 0b1000 ) { // Sign bit is on
284
+ freqError -= 524288 ; // 0b1000 '0000'0000'0000'0000
285
285
}
286
286
287
287
const float fXtal = 32E6 ; // FXOSC: crystal oscillator (XTAL) frequency (2.5. Chip Specification, p. 14)
You can’t perform that action at this time.
0 commit comments