Line data Source code
1 : #pragma once 2 : 3 : #include "AP_RangeFinder_config.h" 4 : 5 : #if AP_RANGEFINDER_BENEWAKE_CAN_ENABLED 6 : #include "AP_RangeFinder_Backend_CAN.h" 7 : 8 : class AP_RangeFinder_Benewake_CAN : public AP_RangeFinder_Backend_CAN { 9 : public: 10 0 : AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) : 11 0 : AP_RangeFinder_Backend_CAN(_state, _params, AP_CAN::Protocol::Benewake, "benewake") 12 : { 13 0 : } 14 : 15 : // handler for incoming frames. Return true if consumed 16 : bool handle_frame(AP_HAL::CANFrame &frame) override; 17 : bool handle_frame_H30(AP_HAL::CANFrame &frame); 18 : 19 : protected: 20 : 21 0 : MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override { 22 0 : return MAV_DISTANCE_SENSOR_LASER; 23 : } 24 : }; 25 : 26 : #endif // AP_RANGEFINDER_BENEWAKE_CAN_ENABLED