Caching carrier frequency

This commit is contained in:
Federico Maggi 2021-04-13 12:22:49 +02:00
parent f9cc7cefcd
commit aebe2d2f98
2 changed files with 4 additions and 0 deletions

View file

@ -407,6 +407,9 @@ int16_t RF69::setFrequency(float freq) {
_mod->SPIwriteRegister(RF69_REG_FRF_MSB, (FRF & 0xFF0000) >> 16); _mod->SPIwriteRegister(RF69_REG_FRF_MSB, (FRF & 0xFF0000) >> 16);
_mod->SPIwriteRegister(RF69_REG_FRF_MID, (FRF & 0x00FF00) >> 8); _mod->SPIwriteRegister(RF69_REG_FRF_MID, (FRF & 0x00FF00) >> 8);
_mod->SPIwriteRegister(RF69_REG_FRF_LSB, FRF & 0x0000FF); _mod->SPIwriteRegister(RF69_REG_FRF_LSB, FRF & 0x0000FF);
_freq = freq;
return(ERR_NONE); return(ERR_NONE);
} }

View file

@ -886,6 +886,7 @@ class RF69: public PhysicalLayer {
protected: protected:
#endif #endif
float _freq = 0;
float _br = 0; float _br = 0;
float _rxBw = 0; float _rxBw = 0;
bool _ook = false; bool _ook = false;