[SX128x] Synced parameters of all FSK modules
This commit is contained in:
parent
ec225236d0
commit
4d00170612
3 changed files with 8 additions and 7 deletions
|
@ -55,7 +55,7 @@ void setup() {
|
|||
state = radio.setBitRate(200);
|
||||
state = radio.setFrequencyDeviation(100.0);
|
||||
state = radio.setOutputPower(5);
|
||||
state = radio.setDataShaping(1.0);
|
||||
state = radio.setDataShaping(RADIOLIB_SHAPING_1_0);
|
||||
uint8_t syncWord[] = {0x01, 0x23, 0x45, 0x67, 0x89};
|
||||
state = radio.setSyncWord(syncWord, 5);
|
||||
if (state != ERR_NONE) {
|
||||
|
|
|
@ -56,7 +56,7 @@ int16_t SX128x::begin(float freq, float bw, uint8_t sf, uint8_t cr, int8_t power
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX128x::beginGFSK(float freq, uint16_t br, float freqDev, int8_t power, uint16_t preambleLength, uint8_t dataShaping) {
|
||||
int16_t SX128x::beginGFSK(float freq, uint16_t br, float freqDev, int8_t power, uint16_t preambleLength) {
|
||||
// set module properties
|
||||
_mod->init(RADIOLIB_USE_SPI);
|
||||
Module::pinMode(_mod->getIrq(), INPUT);
|
||||
|
@ -104,14 +104,17 @@ int16_t SX128x::beginGFSK(float freq, uint16_t br, float freqDev, int8_t power,
|
|||
state = setPreambleLength(preambleLength);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
state = setDataShaping(dataShaping);
|
||||
state = setDataShaping(RADIOLIB_SHAPING_0_5);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set publicly accessible settings that are not a part of begin method
|
||||
uint8_t sync[] = { 0x2D, 0x01 };
|
||||
uint8_t sync[] = { 0x12, 0xAD };
|
||||
state = setSyncWord(sync, 2);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
state = setEncoding(RADIOLIB_ENCODING_NRZ);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
||||
|
|
|
@ -385,11 +385,9 @@ class SX128x: public PhysicalLayer {
|
|||
|
||||
\parma preambleLength FSK preamble length in bits. Defaults to 16 bits.
|
||||
|
||||
\param dataShaping Time-bandwidth product of the Gaussian filter to be used for shaping. Defaults to RADIOLIB_SHAPING_0_5.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t beginGFSK(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint16_t preambleLength = 16, uint8_t dataShaping = RADIOLIB_SHAPING_0_5);
|
||||
int16_t beginGFSK(float freq = 2400.0, uint16_t br = 800, float freqDev = 400.0, int8_t power = 10, uint16_t preambleLength = 16);
|
||||
|
||||
/*!
|
||||
\brief Initialization method for BLE modem.
|
||||
|
|
Loading…
Add table
Reference in a new issue