mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
added rc_status
This commit is contained in:
@@ -100,16 +100,9 @@ static void dialog_with_io_proc() {
|
||||
struct AutopilotMessageCRCFrame msg_out;
|
||||
uint8_t crc_valid;
|
||||
|
||||
#if 0
|
||||
uint16_t val = 1500 + 500*sin(foo*0.001);
|
||||
msg_out.payload.msg_down.pwm_outputs_usecs[0] = val;
|
||||
msg_out.payload.msg_down.pwm_outputs_usecs[1] = val;
|
||||
msg_out.payload.msg_down.pwm_outputs_usecs[2] = val;
|
||||
#endif
|
||||
for (uint8_t i=0; i<6; i++) msg_out.payload.msg_down.pwm_outputs_usecs[i] = otp.servos_outputs_usecs[i];
|
||||
|
||||
spi_link_send(&msg_out, sizeof(struct AutopilotMessageCRCFrame), &msg_in, &crc_valid);
|
||||
|
||||
|
||||
struct AutopilotMessagePTUp *in = &msg_in.payload.msg_up;
|
||||
RATES_FLOAT_OF_BFP(otp.imu.gyro, in->gyro);
|
||||
@@ -119,6 +112,8 @@ static void dialog_with_io_proc() {
|
||||
otp.io_proc_msg_cnt = in->stm_msg_cnt;
|
||||
otp.io_proc_err_cnt = in->stm_crc_err_cnt;
|
||||
|
||||
otp.rc_status = in->rc_status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ struct OveroTestPassthrough {
|
||||
uint32_t io_proc_msg_cnt;
|
||||
uint32_t io_proc_err_cnt;
|
||||
uint16_t servos_outputs_usecs[6]; /* FIXME */
|
||||
uint8_t rc_status;
|
||||
};
|
||||
|
||||
extern struct OveroTestPassthrough otp;
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
&otp.io_proc_msg_cnt, \
|
||||
&otp.io_proc_err_cnt, \
|
||||
&spi_link.msg_cnt, \
|
||||
&spi_link.crc_err_cnt)
|
||||
&spi_link.crc_err_cnt, \
|
||||
&otp.rc_status)
|
||||
|
||||
|
||||
#define PERIODIC_SEND_IMU_GYRO(_transport) \
|
||||
|
||||
Reference in New Issue
Block a user