File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -274,14 +274,14 @@ float LoRaClass::packetSnr()
274274long LoRaClass::packetFrequencyError ()
275275{
276276 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 );
278278 freqError <<= 8L ;
279279 freqError += static_cast <int32_t >(readRegister (REG_FREQ_ERROR_MID));
280280 freqError <<= 8L ;
281281 freqError += static_cast <int32_t >(readRegister (REG_FREQ_ERROR_LSB));
282282
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
285285 }
286286
287287 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