-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dronecan 1140.RCInput: add flags to represent LQ, RSSi dbm and SNR li…
…nk statistics
- Loading branch information
Showing
1 changed file
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
uint8 STATUS_QUALITY_VALID = 1 # quality field is valid | ||
# | ||
# RC channels | ||
# | ||
# The quality field can carry different information on the quality of a radio link, as determined by the flags in the status bitmask: | ||
# - STATUS_QUALITY_VALID: The quality field is valid and represents RSSI in scaled units, 0 is no signal, 255 is "full" signal. The | ||
# mapping of a link's internal RSSI representation onto the scaled units is device dependent. A common mapping can be | ||
# RSSI >= -50 dB: 255 | ||
# RSSI > -120 dB and RSSI < -50 dBm: 255 / 70 * (RSSI + 120) but not smaller than 1 | ||
# RSSI <= -120 dB: 1 | ||
# - STATUS_QUALITY_LQ: The quality field is valid and represents LQ in percent, 0 is no signal, 100 is 100% link quality | ||
# - STATUS_QUALITY_RSSI_DBM: The quality field is valid and represents RSSI in inverted dBm, 0 is no signal, 1 = -1 dBm, 255 = -255 dBm | ||
# - STATUS_QUALITY_SNR: The quality field is valid and represents SNR in device dependent units, value is shifted by 128 to allow | ||
# representing positive and negative values: 128 = 0, 255 = +127, 1 = -127, 0 is no signal | ||
# Only one of these flags can be set at any time. | ||
|
||
uint8 STATUS_QUALITY_VALID = 1 # quality field is valid and represents RSSI in scaled uints, 0 is no signal, 255 is "full" signal | ||
uint8 STATUS_FAILSAFE = 2 # receiver has lost contact with transmitter | ||
uint8 STATUS_QUALITY_LQ = 4 # quality field is valid and represents LQ in percent, 0 is no signal, 100 is 100% link quality | ||
uint8 STATUS_QUALITY_RSSI_DBM = 8 # rssi in inverted dBm, 0 is no signal, 1 = -1 dBm, 255 = -255 dBm | ||
uint8 STATUS_QUALITY_SNR = 16 # quality field is valid and represents SNR in device dependent units, shifted by 128 | ||
|
||
uint16 status # bitmask of status bits, enumerated above with STATUS_* | ||
|
||
uint8 quality # scaled, 0 is no signal, 255 is "full" signal | ||
uint8 quality # see descriptions for status bits STATUS_QUALITY_VALID, STATUS_QUALITY_LQ, STATUS_QUALITY_SNR | ||
uint4 id # ID of this RC input device | ||
|
||
uint12[<=32] rcin # RC channel values between 0 and 4095 | ||
uint12[<=32] rcin # RC channel values between 0 and 4095, 2048 represents the mid position |