mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-25 23:46:04 +08:00
convert fms spi autopilot msg to use new telemetry
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
#include "fms_spi_autopilot_msg.h"
|
||||
|
||||
/* all these for telemetry */
|
||||
#include "messages.h"
|
||||
#include "downlink.h"
|
||||
#include "udp_transport.h"
|
||||
#include "messages2.h"
|
||||
#include "downlink_transport.h"
|
||||
#include "udp_transport2.h"
|
||||
#include "fms/fms_network.h"
|
||||
#include "ready_main.h"
|
||||
|
||||
@@ -53,9 +53,10 @@ static void (* vane_callback)(uint8_t vane_id, float alpha, float beta) = NULL;
|
||||
static void (* pressure_callback)(uint8_t pressure_id, uint32_t pressure1, uint32_t pressure2) = NULL;
|
||||
static void (* radio_control_callback)(void) = NULL;
|
||||
|
||||
void spi_ap_link_downlink_send()
|
||||
void spi_ap_link_downlink_send(struct DownlinkTransport *tp)
|
||||
{
|
||||
DOWNLINK_SEND_EKF7_Y(DefaultChannel, &imu.accel.x, &imu.accel.y, &imu.accel.z,
|
||||
uint32_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);
|
||||
}
|
||||
|
||||
@@ -21,13 +21,19 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef FMS_SPI_AUTOPILOT_MSG_H
|
||||
#define FMS_SPI_AUTOPILOT_MSG_H
|
||||
#include "downlink_transport.h"
|
||||
|
||||
int spi_ap_link_init(void);
|
||||
void spi_ap_link_set_vane_callback(void (* vane_cb)(uint8_t vane_id, float alpha, float beta));
|
||||
void spi_ap_link_set_pressure_callback(void (* pressure_cb)(uint8_t pressure_id, uint32_t pressure1, uint32_t pressure2));
|
||||
void spi_ap_link_set_radio_control_callback(void (* radio_control_cb)(void));
|
||||
void spi_ap_link_periodic(void);
|
||||
void spi_ap_link_downlink_send(void);
|
||||
void spi_ap_link_downlink_send(struct DownlinkTransport *tp);
|
||||
|
||||
#ifdef USE_SPI_LINK
|
||||
#define PERIODIC_SEND_EKF7_Y(_chan) spi_ap_link_downlink_send();
|
||||
#define PERIODIC_SEND_EKF7_Y(_chan) spi_ap_link_downlink_send(_chan);
|
||||
#endif
|
||||
|
||||
#endif // FMS_SPI_AUTOPILOT_MSG_H
|
||||
|
||||
Reference in New Issue
Block a user