[SX1231] Synced parameters of all FSK modules
This commit is contained in:
parent
82e4cb7f97
commit
ec225236d0
2 changed files with 9 additions and 3 deletions
|
@ -5,7 +5,7 @@ SX1231::SX1231(Module* mod) : RF69(mod) {
|
|||
|
||||
}
|
||||
|
||||
int16_t SX1231::begin(float freq, float br, float rxBw, float freqDev, int8_t power) {
|
||||
int16_t SX1231::begin(float freq, float br, float rxBw, float freqDev, int8_t power, uint8_t preambleLen) {
|
||||
// set module properties
|
||||
_mod->init(RADIOLIB_USE_SPI);
|
||||
Module::pinMode(_mod->getIrq(), INPUT);
|
||||
|
@ -69,6 +69,10 @@ int16_t SX1231::begin(float freq, float br, float rxBw, float freqDev, int8_t po
|
|||
state = setOutputPower(power);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// configure default preamble length
|
||||
state = setPreambleLength(preambleLen);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// default sync word values 0x2D01 is the same as the default in LowPowerLab RFM69 library
|
||||
uint8_t syncWord[] = {0x2D, 0x01};
|
||||
state = setSyncWord(syncWord, 2);
|
||||
|
|
|
@ -43,11 +43,13 @@ class SX1231: public RF69 {
|
|||
|
||||
\param freqDev Frequency deviation from carrier frequency in kHz Defaults to 50.0 kHz.
|
||||
|
||||
\param power Output power in dBm. Defaults to 13 dBm.
|
||||
\param power Output power in dBm. Defaults to 10 dBm.
|
||||
|
||||
\param preambleLen Preamble Length in bits. Defaults to 16 bits.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 13);
|
||||
int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 10, uint8_t preambleLen = 16);
|
||||
|
||||
#ifndef RADIOLIB_GODMODE
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue