-
- Downloads
Gather RSSI data from Spektrum Telemetry receivers
On SPM4649T receivers with firmware versions at least 1.1RC9, the serial data will contain an rssi value in dbm, as outlined in the Remote Receiver Interfacing document section 8.3.1. If the value received is greater than or equal to zero, the receiver does not support rssi data, and the incoming value will be ignored. However, if the value is negative, we can use the rssi value. When we have a valid rssi, it gets mapped to a percentage from 0 to 100 as expected by mavlink. This mapping is constructed as a logarithmic function over Spektrum's published minimum and maximum rssi values, -92dBm to -42dBm as 0 to 100: 100 Log10[1 + (x - min) * (9 / (max - min))] This change updates all calls to the dsm input rountes to return the rssi value. Note that one place this doesn't work with the px4io enabled. There is a comment left in the absence of analog rssi that: "we do not actually get digital RSSI regs[PX4IO_P_RAW_RC_NRSSI]". This restriction has been left in place, as removing it exposes a problem where the frequency of the control tick is greater than that of valid dsm frames so the rssi isn't valid every cycle.
Showing
- src/drivers/px4fmu/fmu.cpp 4 additions, 2 deletionssrc/drivers/px4fmu/fmu.cpp
- src/drivers/spektrum_rc/spektrum_rc.cpp 3 additions, 5 deletionssrc/drivers/spektrum_rc/spektrum_rc.cpp
- src/lib/rc/dsm.cpp 50 additions, 7 deletionssrc/lib/rc/dsm.cpp
- src/lib/rc/dsm.h 2 additions, 2 deletionssrc/lib/rc/dsm.h
- src/lib/rc/rc_tests/RCTest.cpp 1 addition, 1 deletionsrc/lib/rc/rc_tests/RCTest.cpp
- src/lib/rc/spektrum_rssi.h 78 additions, 0 deletionssrc/lib/rc/spektrum_rssi.h
- src/modules/px4iofirmware/controls.c 3 additions, 1 deletionsrc/modules/px4iofirmware/controls.c
Loading
Please register or sign in to comment