[RF69] Fixed setOOK()

This commit is contained in:
Alessandro Fiorillo 2020-12-04 15:36:58 +01:00
parent 3d1c45654b
commit 1787505ea7
3 changed files with 2 additions and 11 deletions

View file

@ -641,7 +641,6 @@ int16_t CC1101::setOOK(bool enableOOK) {
state = SPIsetRegValue(CC1101_REG_FREND0, 1, 2, 0); state = SPIsetRegValue(CC1101_REG_FREND0, 1, 2, 0);
RADIOLIB_ASSERT(state); RADIOLIB_ASSERT(state);
// update current modulation // update current modulation
_modulation = CC1101_MOD_FORMAT_ASK_OOK; _modulation = CC1101_MOD_FORMAT_ASK_OOK;
} else { } else {

View file

@ -369,26 +369,18 @@ int16_t RF69::readData(uint8_t* data, size_t len) {
return(ERR_NONE); return(ERR_NONE);
} }
/* int16_t RF69::setOOK(bool enableOOK) {
int16_t CC1101::setOOK(bool enableOOK) {
// Change modulation // Change modulation
if(enableOOK) { if(enableOOK) {
int16_t state = SPIsetRegValue(RF69_REG_DATA_MODUL, RF69_OOK, 4, 3); int16_t state = SPIsetRegValue(RF69_REG_DATA_MODUL, RF69_OOK, 4, 3);
RADIOLIB_ASSERT(state); RADIOLIB_ASSERT(state);
// update current modulation
_modulation = CC1101_MOD_FORMAT_ASK_OOK;
} else { } else {
int16_t state = SPIsetRegValue(RF69_REG_DATA_MODUL, RF69_FSK, 4, 3); int16_t state = SPIsetRegValue(RF69_REG_DATA_MODUL, RF69_FSK, 4, 3);
RADIOLIB_ASSERT(state); RADIOLIB_ASSERT(state);
// update current modulation
_modulation = CC1101_MOD_FORMAT_2_FSK;
} }
return(setOutputPower(_power)); return(setOutputPower(_power));
} }
*/
int16_t RF69::setFrequency(float freq) { int16_t RF69::setFrequency(float freq) {
// check allowed frequency range // check allowed frequency range

View file

@ -621,7 +621,7 @@ class RF69: public PhysicalLayer {
\returns \ref status_codes \returns \ref status_codes
*/ */
//int16_t setOOK(bool enableOOK); int16_t setOOK(bool enableOOK);
/*! /*!
\brief Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510.0 MHz and 862.0 to 1020.0 MHz. \brief Sets carrier frequency. Allowed values are in bands 290.0 to 340.0 MHz, 431.0 to 510.0 MHz and 862.0 to 1020.0 MHz.