Merge pull request #243 from angrypig7/master
Added GetRSSIInst command for SX126x
This commit is contained in:
commit
f6cfed4c60
2 changed files with 14 additions and 0 deletions
|
@ -1130,6 +1130,13 @@ uint32_t SX126x::getTimeOnAir(size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
float SX126x::getRSSIInst() {
|
||||
uint8_t data[3] = {0, 0, 0}; // RssiInst, Status, RFU
|
||||
SPIreadCommand(SX126X_CMD_GET_RSSI_INST, data, 3);
|
||||
|
||||
return (float)data[0] / (-2.0);
|
||||
}
|
||||
|
||||
int16_t SX126x::implicitHeader(size_t len) {
|
||||
return(setHeaderType(SX126X_LORA_HEADER_IMPLICIT, len));
|
||||
}
|
||||
|
|
|
@ -806,6 +806,13 @@ class SX126x: public PhysicalLayer {
|
|||
*/
|
||||
uint32_t getTimeOnAir(size_t len);
|
||||
|
||||
/*!
|
||||
\brief Get instantaneous RSSI value during recption of the packet. Should switch to FSK receive mode for LBT implementation.
|
||||
|
||||
\returns Instantaneous RSSI value in dBm, in steps of 0.5dBm
|
||||
*/
|
||||
float getRSSIInst();
|
||||
|
||||
/*!
|
||||
\brief Set implicit header mode for future reception/transmission.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue