Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dronecan 1140.RCInput: add flags to represent LQ and SNR link statistics #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions dronecan/sensors/rc/1140.RCInput.uavcan
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#
# RC channels and basic link statistics
#

uint8 STATUS_QUALITY_VALID = 1 # quality field is valid
uint8 STATUS_FAILSAFE = 2 # receiver has lost contact with transmitter
uint8 STATUS_QUALITY_TYPE = 28 # mask of 3 bits (4+8+16) to indicate the type of data carried in the quality field, see QUALITY_TYPE enum

uint8 QUALITY_TYPE_RSSI = 0 # quality field represents RSSI in scaled units, 0 is no signal, 255 is "full" signal
uint8 QUALITY_TYPE_LQ_ACTIVE_ANTENNA = 4 # quality field represents LQ in percent in bits 1-7 (0 is no signal, 100 is 100% link quality) and active antenna in bit 8
uint8 QUALITY_TYPE_RSSI_DBM = 8 # quality field represents RSSI in inverted dBm, 0 is no signal, 1 = -1 dBm, 255 = -255 dBm
uint8 QUALITY_TYPE_SNR = 12 # quality field represents SNR in device dependent units, shifted by 128
uint8 QUALITY_TYPE_TX_POWER = 16 # quality field represents uplink power in units of 5 mW

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, values are in PWM microseconds, 1500 represents the mid position