Line data Source code
1 : #pragma once 2 : 3 : #include "AP_Compass_config.h" 4 : 5 : #if AP_COMPASS_MSP_ENABLED 6 : 7 : #include "AP_Compass.h" 8 : #include "AP_Compass_Backend.h" 9 : #include <AP_MSP/msp.h> 10 : 11 : class AP_Compass_MSP : public AP_Compass_Backend 12 : { 13 : public: 14 : 15 : static AP_Compass_Backend *probe(uint8_t _msp_instance); 16 : 17 : private: 18 0 : AP_Compass_MSP(uint8_t _msp_instance) : 19 0 : msp_instance{_msp_instance} { } 20 : 21 : bool init(); 22 : 23 : void handle_msp(const MSP::msp_compass_data_message_t &pkt) override; 24 : uint8_t msp_instance; 25 : uint8_t instance; 26 : }; 27 : 28 : #endif // AP_COMPASS_MSP_ENABLED