ardupilot/libraries/AP_EFI/AP_EFI_DroneCAN.h

29 lines
678 B
C
Raw Normal View History

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
2022-06-03 19:09:58 -03:00
#include <AP_UAVCAN/AP_UAVCAN.h>
#include <uavcan/equipment/ice/reciprocating/Status.hpp>
class EFIStatusCb;
class AP_EFI_DroneCAN : public AP_EFI_Backend {
public:
AP_EFI_DroneCAN(AP_EFI &_frontend);
void update() override;
static void subscribe_msgs(AP_UAVCAN* ap_uavcan);
static void trampoline_status(AP_UAVCAN* ap_uavcan, uint8_t node_id, const EFIStatusCb &cb);
private:
void handle_status(const uavcan::equipment::ice::reciprocating::Status &pkt);
// 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