diff options
Diffstat (limited to 'mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h')
-rw-r--r-- | mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h b/mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h index 2a0d49f34..3ab855ba8 100644 --- a/mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h +++ b/mavlink/include/mavlink/v1.0/sensesoar/mavlink_msg_obs_bias.h @@ -15,6 +15,9 @@ typedef struct __mavlink_obs_bias_t #define MAVLINK_MSG_ID_OBS_BIAS_LEN 24 #define MAVLINK_MSG_ID_180_LEN 24 +#define MAVLINK_MSG_ID_OBS_BIAS_CRC 159 +#define MAVLINK_MSG_ID_180_CRC 159 + #define MAVLINK_MSG_OBS_BIAS_FIELD_ACCBIAS_LEN 3 #define MAVLINK_MSG_OBS_BIAS_FIELD_GYROBIAS_LEN 3 @@ -45,21 +48,25 @@ static inline uint16_t mavlink_msg_obs_bias_pack(uint8_t system_id, uint8_t comp const float *accBias, const float *gyroBias) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[24]; + char buf[MAVLINK_MSG_ID_OBS_BIAS_LEN]; _mav_put_float_array(buf, 0, accBias, 3); _mav_put_float_array(buf, 12, gyroBias, 3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 24); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OBS_BIAS_LEN); #else mavlink_obs_bias_t packet; mav_array_memcpy(packet.accBias, accBias, sizeof(float)*3); mav_array_memcpy(packet.gyroBias, gyroBias, sizeof(float)*3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 24); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OBS_BIAS_LEN); #endif msg->msgid = MAVLINK_MSG_ID_OBS_BIAS; - return mavlink_finalize_message(msg, system_id, component_id, 24, 159); +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OBS_BIAS_LEN, MAVLINK_MSG_ID_OBS_BIAS_CRC); +#else + return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OBS_BIAS_LEN); +#endif } /** @@ -81,21 +88,25 @@ static inline uint16_t mavlink_msg_obs_bias_pack_chan(uint8_t system_id, uint8_t const float *accBias,const float *gyroBias) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[24]; + char buf[MAVLINK_MSG_ID_OBS_BIAS_LEN]; _mav_put_float_array(buf, 0, accBias, 3); _mav_put_float_array(buf, 12, gyroBias, 3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, 24); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OBS_BIAS_LEN); #else mavlink_obs_bias_t packet; mav_array_memcpy(packet.accBias, accBias, sizeof(float)*3); mav_array_memcpy(packet.gyroBias, gyroBias, sizeof(float)*3); - memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, 24); + memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OBS_BIAS_LEN); #endif msg->msgid = MAVLINK_MSG_ID_OBS_BIAS; - return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 24, 159); +#if MAVLINK_CRC_EXTRA + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OBS_BIAS_LEN, MAVLINK_MSG_ID_OBS_BIAS_CRC); +#else + return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OBS_BIAS_LEN); +#endif } /** @@ -127,17 +138,25 @@ static inline uint16_t mavlink_msg_obs_bias_encode(uint8_t system_id, uint8_t co static inline void mavlink_msg_obs_bias_send(mavlink_channel_t chan, const float *accBias, const float *gyroBias) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS - char buf[24]; + char buf[MAVLINK_MSG_ID_OBS_BIAS_LEN]; _mav_put_float_array(buf, 0, accBias, 3); _mav_put_float_array(buf, 12, gyroBias, 3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, buf, 24, 159); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, buf, MAVLINK_MSG_ID_OBS_BIAS_LEN, MAVLINK_MSG_ID_OBS_BIAS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, buf, MAVLINK_MSG_ID_OBS_BIAS_LEN); +#endif #else mavlink_obs_bias_t packet; mav_array_memcpy(packet.accBias, accBias, sizeof(float)*3); mav_array_memcpy(packet.gyroBias, gyroBias, sizeof(float)*3); - _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, (const char *)&packet, 24, 159); +#if MAVLINK_CRC_EXTRA + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, (const char *)&packet, MAVLINK_MSG_ID_OBS_BIAS_LEN, MAVLINK_MSG_ID_OBS_BIAS_CRC); +#else + _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBS_BIAS, (const char *)&packet, MAVLINK_MSG_ID_OBS_BIAS_LEN); +#endif #endif } @@ -182,6 +201,6 @@ static inline void mavlink_msg_obs_bias_decode(const mavlink_message_t* msg, mav mavlink_msg_obs_bias_get_accBias(msg, obs_bias->accBias); mavlink_msg_obs_bias_get_gyroBias(msg, obs_bias->gyroBias); #else - memcpy(obs_bias, _MAV_PAYLOAD(msg), 24); + memcpy(obs_bias, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_OBS_BIAS_LEN); #endif } |