2021-11-12 06:11:48 -04:00
|
|
|
#pragma once
|
|
|
|
|
2023-07-06 01:25:14 -03:00
|
|
|
#include "AP_RangeFinder_config.h"
|
2022-03-12 06:37:29 -04:00
|
|
|
|
|
|
|
#if AP_RANGEFINDER_BENEWAKE_CAN_ENABLED
|
2023-06-19 14:09:46 -03:00
|
|
|
#include "AP_RangeFinder_Backend_CAN.h"
|
2021-11-12 06:11:48 -04:00
|
|
|
|
2023-06-19 14:09:46 -03:00
|
|
|
class AP_RangeFinder_Benewake_CAN : public AP_RangeFinder_Backend_CAN {
|
2021-11-12 06:11:48 -04:00
|
|
|
public:
|
2024-02-22 22:01:25 -04:00
|
|
|
AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) :
|
|
|
|
AP_RangeFinder_Backend_CAN(_state, _params, AP_CAN::Protocol::Benewake, "benewake")
|
|
|
|
{
|
|
|
|
}
|
2021-11-12 06:11:48 -04:00
|
|
|
|
2021-12-03 00:29:43 -04:00
|
|
|
// handler for incoming frames. Return true if consumed
|
2023-06-19 14:09:46 -03:00
|
|
|
bool handle_frame(AP_HAL::CANFrame &frame) override;
|
2022-07-11 04:58:31 -03:00
|
|
|
bool handle_frame_H30(AP_HAL::CANFrame &frame);
|
2021-11-12 06:11:48 -04:00
|
|
|
};
|
2021-12-03 00:29:43 -04:00
|
|
|
|
2022-03-12 06:37:29 -04:00
|
|
|
#endif // AP_RANGEFINDER_BENEWAKE_CAN_ENABLED
|