correct return types

This commit is contained in:
Callan Bryant 2020-01-13 12:14:56 +00:00
parent e441e101ff
commit 17e3f47c2f
No known key found for this signature in database
GPG key ID: C31FA9DF3ACBFFAA
2 changed files with 6 additions and 4 deletions

View file

@ -1178,11 +1178,11 @@ uint32_t SX126x::getTimeOnAir(size_t len) {
}
}
void SX126x::implicitHeader(size_t len) {
int16_t SX126x::implicitHeader(size_t len) {
return setHeaderType(SX126X_LORA_HEADER_IMPLICIT, len);
}
void SX126x::explicitHeader() {
int16_t SX126x::explicitHeader() {
return setHeaderType(SX126X_LORA_HEADER_EXPLICIT);
}
@ -1367,6 +1367,7 @@ int16_t SX126x::setHeaderType(uint8_t headerType, size_t len) {
if(getPacketType() != SX126X_PACKET_TYPE_LORA) {
return(ERR_WRONG_MODEM);
}
// set requested packet mode
int16_t state = setPacketParams(_preambleLength, _crcType, len, headerType);
@ -1377,6 +1378,7 @@ int16_t SX126x::setHeaderType(uint8_t headerType, size_t len) {
// update cached value
_headerType = headerType;
_implicitLen = len;
return(state);
}

View file

@ -795,7 +795,7 @@ class SX126x: public PhysicalLayer {
\returns \ref status_codes
*/
void implicitHeader(size_t len);
int16_t implicitHeader(size_t len);
/*!
\brief Set explicit header mode for future reception/transmission.
@ -804,7 +804,7 @@ class SX126x: public PhysicalLayer {
\returns \ref status_codes
*/
void explicitHeader();
int16_t explicitHeader();
#ifndef RADIOLIB_GODMODE
protected:
#endif