pass len as param to implicitHeader
This commit is contained in:
parent
54f058de02
commit
51ce45220b
2 changed files with 8 additions and 6 deletions
|
@ -1170,8 +1170,8 @@ uint32_t SX126x::getTimeOnAir(size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
int16_t implicitHeader() {
|
||||
return setHeaderType(SX126X_LORA_HEADER_IMPLICIT);
|
||||
int16_t implicitHeader(size_t len) {
|
||||
return setHeaderType(SX126X_LORA_HEADER_IMPLICIT, len);
|
||||
}
|
||||
|
||||
int16_t explicitHeader() {
|
||||
|
@ -1354,9 +1354,9 @@ int16_t SX126x::setPacketMode(uint8_t mode, uint8_t len) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX126x::setHeaderType(uint8_t headerType) {
|
||||
int16_t SX126x::setHeaderType(uint8_t headerType, size_t len) {
|
||||
// set requested packet mode
|
||||
int16_t state = setPacketParams(_preambleLength, _crcType, 0xFF, headerType);
|
||||
int16_t state = setPacketParams(_preambleLength, _crcType, len, headerType);
|
||||
|
||||
if(state != ERR_NONE) {
|
||||
return(state);
|
||||
|
|
|
@ -795,11 +795,13 @@ class SX126x: public PhysicalLayer {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t implicitHeader();
|
||||
int16_t implicitHeader(size_t len);
|
||||
|
||||
/*!
|
||||
\brief Set explicit header mode for future reception/transmission.
|
||||
|
||||
\param len Payload length in bytes. **WILL BE GLOBALLY OVERRIDDEN BY transmit()**
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t explicitHeader();
|
||||
|
@ -836,7 +838,7 @@ class SX126x: public PhysicalLayer {
|
|||
int16_t setFrequencyRaw(float freq);
|
||||
int16_t setOptimalHiPowerPaConfig(int8_t* inOutPower);
|
||||
int16_t setPacketMode(uint8_t mode, uint8_t len);
|
||||
int16_t setHeaderType(uint8_t headerType)
|
||||
int16_t setHeaderType(uint8_t headerType, size_t len = 0xFF)
|
||||
|
||||
// fixes to errata
|
||||
int16_t fixSensitivity();
|
||||
|
|
Loading…
Add table
Reference in a new issue