Add support for PX4 RSSI (#4559)

This commit is contained in:
alteman
2017-03-05 17:41:15 +01:00
committed by Bertrand Songis
parent cd6eef2cfa
commit d9c95f97d7
+12 -1
View File
@@ -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;