2022-06-03 19:09:58 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AP_EFI.h"
|
|
|
|
#include "AP_EFI_Backend.h"
|
|
|
|
|
2023-03-15 20:05:59 -03:00
|
|
|
#if AP_EFI_DRONECAN_ENABLED
|
2023-04-06 21:18:01 -03:00
|
|
|
#include <AP_DroneCAN/AP_DroneCAN.h>
|
2022-06-03 19:09:58 -03:00
|
|
|
|
|
|
|
class AP_EFI_DroneCAN : public AP_EFI_Backend {
|
|
|
|
public:
|
|
|
|
AP_EFI_DroneCAN(AP_EFI &_frontend);
|
|
|
|
|
|
|
|
void update() override;
|
|
|
|
|
2023-04-06 21:18:01 -03:00
|
|
|
static void subscribe_msgs(AP_DroneCAN* ap_dronecan);
|
|
|
|
static void trampoline_status(AP_DroneCAN *ap_dronecan, const CanardRxTransfer& transfer, const uavcan_equipment_ice_reciprocating_Status &msg);
|
2022-06-03 19:09:58 -03:00
|
|
|
|
|
|
|
private:
|
2023-01-04 20:21:20 -04:00
|
|
|
void handle_status(const uavcan_equipment_ice_reciprocating_Status &pkt);
|
2022-06-03 19:09:58 -03:00
|
|
|
|
|
|
|
// singleton for trampoline
|
|
|
|
static AP_EFI_DroneCAN *driver;
|
|
|
|
};
|
2023-03-15 20:05:59 -03:00
|
|
|
#endif // AP_EFI_DRONECAN_ENABLED
|
2022-06-03 19:09:58 -03:00
|
|
|
|