[SX126x] Added missing setFrequency implementation for PhysicalLayer
This commit is contained in:
parent
1f75ee0cc1
commit
972e651f4f
5 changed files with 31 additions and 6 deletions
|
@ -47,6 +47,10 @@ int16_t SX1262::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX1262::setFrequency(float freq) {
|
||||
return(setFrequency(freq, true));
|
||||
}
|
||||
|
||||
int16_t SX1262::setFrequency(float freq, bool calibrate) {
|
||||
RADIOLIB_CHECK_RANGE(freq, 150.0, 960.0, RADIOLIB_ERR_INVALID_FREQUENCY);
|
||||
|
||||
|
|
|
@ -75,6 +75,15 @@ class SX1262: public SX126x {
|
|||
|
||||
// configuration methods
|
||||
|
||||
/*!
|
||||
\brief Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz.
|
||||
|
||||
\param freq Carrier frequency to be set in MHz.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setFrequency(float freq);
|
||||
|
||||
/*!
|
||||
\brief Sets carrier frequency. Allowed values are in range from 150.0 to 960.0 MHz.
|
||||
|
||||
|
@ -84,7 +93,7 @@ class SX1262: public SX126x {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setFrequency(float freq, bool calibrate = true);
|
||||
int16_t setFrequency(float freq, bool calibrate);
|
||||
|
||||
/*!
|
||||
\brief Sets output power. Allowed values are in range from -17 to 22 dBm.
|
||||
|
|
|
@ -47,6 +47,10 @@ int16_t SX1268::beginFSK(float freq, float br, float freqDev, float rxBw, int8_t
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX1268::setFrequency(float freq) {
|
||||
return(setFrequency(freq, true));
|
||||
}
|
||||
|
||||
/// \todo integers only (all modules - frequency, data rate, bandwidth etc.)
|
||||
int16_t SX1268::setFrequency(float freq, bool calibrate) {
|
||||
RADIOLIB_CHECK_RANGE(freq, 410.0, 810.0, RADIOLIB_ERR_INVALID_FREQUENCY);
|
||||
|
|
|
@ -75,6 +75,15 @@ class SX1268: public SX126x {
|
|||
|
||||
// configuration methods
|
||||
|
||||
/*!
|
||||
\brief Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz.
|
||||
|
||||
\param freq Carrier frequency to be set in MHz.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setFrequency(float freq);
|
||||
|
||||
/*!
|
||||
\brief Sets carrier frequency. Allowed values are in range from 410.0 to 810.0 MHz.
|
||||
|
||||
|
@ -84,7 +93,7 @@ class SX1268: public SX126x {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setFrequency(float freq, bool calibrate = true);
|
||||
int16_t setFrequency(float freq, bool calibrate);
|
||||
|
||||
/*!
|
||||
\brief Sets output power. Allowed values are in range from -9 to 22 dBm.
|
||||
|
|
|
@ -191,7 +191,7 @@ class PhysicalLayer {
|
|||
// configuration methods
|
||||
|
||||
/*!
|
||||
\brief Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz.
|
||||
\brief Sets carrier frequency. Must be implemented in module class.
|
||||
|
||||
\param freq Carrier frequency to be set in MHz.
|
||||
|
||||
|
@ -200,7 +200,7 @@ class PhysicalLayer {
|
|||
virtual int16_t setFrequency(float freq) = 0;
|
||||
|
||||
/*!
|
||||
\brief Sets FSK bit rate. Allowed values range from 1.2 to 300 kbps. Only available in FSK mode.
|
||||
\brief Sets FSK bit rate. Only available in FSK mode. Must be implemented in module class.
|
||||
|
||||
\param br Bit rate to be set (in kbps).
|
||||
|
||||
|
@ -209,8 +209,7 @@ class PhysicalLayer {
|
|||
virtual int16_t setBitRate(float br) = 0;
|
||||
|
||||
/*!
|
||||
\brief Sets FSK frequency deviation from carrier frequency. Allowed values depend on bit rate setting and must be lower than 200 kHz.
|
||||
Only available in FSK mode. Must be implemented in module class.
|
||||
\brief Sets FSK frequency deviation from carrier frequency. Only available in FSK mode. Must be implemented in module class.
|
||||
|
||||
\param freqDev Frequency deviation to be set (in kHz).
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue