From 5b6a472e54b274ad4a0ef9d2e4e19d8fbfaedc09 Mon Sep 17 00:00:00 2001 From: Allen Ibara Date: Wed, 15 Sep 2010 04:58:37 +0000 Subject: [PATCH] Fixes for fms_spi_autopilot renaming of aux2/3/4 --- sw/airborne/fms/fms_autopilot_msg.h | 2 +- sw/airborne/fms/fms_spi_autopilot_msg.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sw/airborne/fms/fms_autopilot_msg.h b/sw/airborne/fms/fms_autopilot_msg.h index 022f4aef8e..3a5e6ecc08 100644 --- a/sw/airborne/fms/fms_autopilot_msg.h +++ b/sw/airborne/fms/fms_autopilot_msg.h @@ -97,8 +97,8 @@ struct __attribute__ ((packed)) AutopilotMessagePTUp int16_t rc_mode; int16_t rc_kill; int16_t rc_gear; + int16_t rc_aux2; int16_t rc_aux3; - int16_t rc_aux4; uint8_t rc_status; float vane_angle1; float vane_angle2; diff --git a/sw/airborne/fms/fms_spi_autopilot_msg.c b/sw/airborne/fms/fms_spi_autopilot_msg.c index ee3fa2a09f..d169554982 100644 --- a/sw/airborne/fms/fms_spi_autopilot_msg.c +++ b/sw/airborne/fms/fms_spi_autopilot_msg.c @@ -47,7 +47,7 @@ #include "rdyb_mahrs.h" static struct BoozImuFloat imu; -static struct FloatQuat body_to_imu_quat = LISA_BODY_TO_IMU_QUAT; +static struct FloatQuat body_to_imu_quat = IMU_POSE_BODY_TO_IMU_QUAT; static void (* vane_callback)(uint8_t vane_id, float alpha, float beta) = NULL; static void (* pressure_absolute_callback)(uint8_t pressure_id, uint32_t pressure) = NULL; @@ -57,7 +57,7 @@ static void (* adc_callback)(uint16_t * adc_channels) = NULL; void spi_ap_link_downlink_send(struct DownlinkTransport *tp) { - uint32_t timestamp = 0; + uint16_t timestamp = 0; DOWNLINK_SEND_EKF7_Y(tp, ×tamp, &imu.accel.x, &imu.accel.y, &imu.accel.z, &imu.mag.x, &imu.mag.y, &imu.mag.z, &imu.gyro.p, &imu.gyro.q, &imu.gyro.r); @@ -129,7 +129,7 @@ static void passthrough_up_parse(struct AutopilotMessagePTUp *msg_up) if (msg_up->valid.adc) { if(adc_callback) { - adc_callback(&msg_up->adc.channels); + adc_callback(msg_up->adc.channels); } } @@ -142,8 +142,8 @@ static void passthrough_up_parse(struct AutopilotMessagePTUp *msg_up) radio_control.values[RADIO_CONTROL_MODE] = msg_up->rc_mode; radio_control.values[RADIO_CONTROL_KILL] = msg_up->rc_kill; radio_control.values[RADIO_CONTROL_GEAR] = msg_up->rc_gear; + radio_control.values[RADIO_CONTROL_AUX2] = msg_up->rc_aux2; radio_control.values[RADIO_CONTROL_AUX3] = msg_up->rc_aux3; - radio_control.values[RADIO_CONTROL_AUX4] = msg_up->rc_aux4; radio_control_callback(); } // always fill status, it may change even when in the case when there is no new data