Replies: 1 comment 2 replies
-
In general, I always try to stick as much as possible to physical units - IMHO, getRSSI should return RSSI in dBm, and setRSSIThreshold should take argument in the same unit. Sometimes arbitrary units are inevitable, but that's not the case here, so I would prefer a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Following the merge of #542, one can now configure a DIO pin to output the RSSI interrupt which gets asserted when the received RSSI raw value is above a given threshold.
Unfortunately, there is currently no way to set that threshold value as there is no public method for it.
In the RFM69, the value is stored in the
RADIOLIB_RF69_REG_RSSI_THRESH
register and I can easily write asetRSSIThreshold(byte value)
method.But reading the datasheet and the existing
RF69:getRSSI()
method code, I see that RadioLib is making it easier for end users by dividing by two and negating the register value when retrieving the current RSSI value.I'm thus wondering if the newly written
setRSSIThreshold
method should instead accept afloat
and multiply the received value by-2.0
so that end users send a "user friendly" RSSI value while the method ensures a valid register value is set.I checked and this division by -2 is also done for the SX1278 family and the SX1231 (derived from RFM69), so I'm suggesting to provide the same functionality on those chips as well.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions