mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 03:19:53 +03:00
Add support for PX4 RSSI (#4559)
This commit is contained in:
parent
cd6eef2cfa
commit
d9c95f97d7
1 changed files with 12 additions and 1 deletions
|
@ -117,7 +117,15 @@ static inline void REC_MAVLINK_MSG_ID_SYS_STATUS(const mavlink_message_t* msg) {
|
|||
#endif
|
||||
}
|
||||
|
||||
/*! \brief Recive rc channels
|
||||
/*! \brief Receive rc channels
|
||||
*
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_RC_CHANNELS(const mavlink_message_t* msg) {
|
||||
uint8_t temp_scale = 5 + g_model.mavlink.rc_rssi_scale;
|
||||
telemetry_data.rc_rssi = mavlink_msg_rc_channels_get_rssi(msg) * 20 / temp_scale;
|
||||
}
|
||||
|
||||
/*! \brief Receive raw rc channels
|
||||
*
|
||||
*/
|
||||
static inline void REC_MAVLINK_MSG_ID_RC_CHANNELS_RAW(const mavlink_message_t* msg) {
|
||||
|
@ -369,6 +377,9 @@ static inline void handleMessage(mavlink_message_t* p_rxmsg) {
|
|||
case MAVLINK_MSG_ID_SYS_STATUS:
|
||||
REC_MAVLINK_MSG_ID_SYS_STATUS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS:
|
||||
REC_MAVLINK_MSG_ID_RC_CHANNELS(p_rxmsg);
|
||||
break;
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
|
||||
REC_MAVLINK_MSG_ID_RC_CHANNELS_RAW(p_rxmsg);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue