kopia lustrzana https://github.com/jgromes/RadioLib
[LLCC68] Chore: uncrustify formatting
rodzic
09792bfc6b
commit
393fd8b9c6
|
@ -153,7 +153,7 @@ int16_t LLCC68::checkDataRate(DataRate_t dr) {
|
|||
RADIOLIB_CHECK_RANGE(dr.lora.bandwidth, 100.0f, 510.0f, RADIOLIB_ERR_INVALID_BANDWIDTH);
|
||||
RADIOLIB_CHECK_RANGE(dr.lora.codingRate, 5, 8, RADIOLIB_ERR_INVALID_CODING_RATE);
|
||||
uint8_t bw_div2 = dr.lora.bandwidth / 2 + 0.01f;
|
||||
switch (bw_div2) {
|
||||
switch(bw_div2) {
|
||||
case 62: // 125.0:
|
||||
RADIOLIB_CHECK_RANGE(dr.lora.spreadingFactor, 5, 9, RADIOLIB_ERR_INVALID_SPREADING_FACTOR);
|
||||
break;
|
||||
|
@ -167,7 +167,7 @@ int16_t LLCC68::checkDataRate(DataRate_t dr) {
|
|||
return(RADIOLIB_ERR_INVALID_BANDWIDTH);
|
||||
}
|
||||
return(RADIOLIB_ERR_NONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return(state);
|
||||
|
@ -175,13 +175,13 @@ int16_t LLCC68::checkDataRate(DataRate_t dr) {
|
|||
|
||||
int16_t LLCC68::setModem(ModemType_t modem) {
|
||||
switch(modem) {
|
||||
case(ModemType_t::RADIOLIB_MODEM_LORA): {
|
||||
case (ModemType_t::RADIOLIB_MODEM_LORA): {
|
||||
return(this->begin());
|
||||
} break;
|
||||
case(ModemType_t::RADIOLIB_MODEM_FSK): {
|
||||
case (ModemType_t::RADIOLIB_MODEM_FSK): {
|
||||
return(this->beginFSK());
|
||||
} break;
|
||||
case(ModemType_t::RADIOLIB_MODEM_LRFHSS): {
|
||||
case (ModemType_t::RADIOLIB_MODEM_LRFHSS): {
|
||||
return(this->beginLRFHSS());
|
||||
} break;
|
||||
default:
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
#include "../SX126x/SX1262.h"
|
||||
#include "../SX126x/SX1261.h"
|
||||
|
||||
//RADIOLIB_SX126X_REG_VERSION_STRING
|
||||
// RADIOLIB_SX126X_REG_VERSION_STRING
|
||||
#define RADIOLIB_LLCC68_CHIP_TYPE "LLCC68"
|
||||
|
||||
/*!
|
||||
\class LLCC68
|
||||
\brief Derived class for %LLCC68 modules.
|
||||
*/
|
||||
class LLCC68: public SX1262 {
|
||||
class LLCC68 : public SX1262 {
|
||||
public:
|
||||
/*!
|
||||
\brief Default constructor.
|
||||
|
@ -40,7 +40,7 @@ class LLCC68: public SX1262 {
|
|||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX126X_SYNC_WORD_PRIVATE, int8_t power = 10, uint16_t preambleLength = 8, float tcxoVoltage = 0, bool useRegulatorLDO = false) override;
|
||||
|
||||
|
||||
/*!
|
||||
\brief Initialization method for FSK modem.
|
||||
\param freq Carrier frequency in MHz. Defaults to 434.0 MHz.
|
||||
|
@ -56,7 +56,7 @@ class LLCC68: public SX1262 {
|
|||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 156.2, int8_t power = 10, uint16_t preambleLength = 16, float tcxoVoltage = 0, bool useRegulatorLDO = false) override;
|
||||
|
||||
|
||||
/*!
|
||||
\brief Initialization method for LR-FHSS modem. This modem only supports transmission!
|
||||
\param freq Carrier frequency in MHz. Defaults to 434.0 MHz.
|
||||
|
@ -71,7 +71,7 @@ class LLCC68: public SX1262 {
|
|||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t beginLRFHSS(float freq = 434.0, uint8_t bw = RADIOLIB_SX126X_LR_FHSS_BW_722_66, uint8_t cr = RADIOLIB_SX126X_LR_FHSS_CR_2_3, bool narrowGrid = true, int8_t power = 10, float tcxoVoltage = 0, bool useRegulatorLDO = false) override;
|
||||
|
||||
|
||||
// configuration methods
|
||||
|
||||
/*!
|
||||
|
@ -94,14 +94,14 @@ class LLCC68: public SX1262 {
|
|||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setDataRate(DataRate_t dr) override;
|
||||
|
||||
|
||||
/*!
|
||||
\brief Check the data rate can be configured by this module.
|
||||
\param dr Data rate struct. Interpretation depends on currently active modem (FSK or LoRa).
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t checkDataRate(DataRate_t dr) override;
|
||||
|
||||
|
||||
/*!
|
||||
\brief Set modem for the radio to use. Will perform full reset and reconfigure the radio
|
||||
using its default parameters.
|
||||
|
@ -110,9 +110,9 @@ class LLCC68: public SX1262 {
|
|||
*/
|
||||
int16_t setModem(ModemType_t modem) override;
|
||||
|
||||
#if !RADIOLIB_GODMODE
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue