AP_CANManager: support Benewake CAN

This commit is contained in:
Andrew Tridgell 2021-11-12 21:12:11 +11:00
parent 3f85eab272
commit 4f6da39bb7
4 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ const AP_Param::GroupInfo AP_CANManager::CANDriver_Params::var_info[] = {
// @Param: PROTOCOL
// @DisplayName: Enable use of specific protocol over virtual driver
// @Description: Enabling this option starts selected protocol that will use this virtual driver
// @Values: 0:Disabled,1:UAVCAN,3:ToshibaCAN,4:PiccoloCAN,5:CANTester,6:EFI_NWPMU,7:USD1,8:KDECAN,9:PacketDigital,10:Scripting
// @Values: 0:Disabled,1:UAVCAN,3:ToshibaCAN,4:PiccoloCAN,5:CANTester,6:EFI_NWPMU,7:USD1,8:KDECAN,9:PacketDigital,10:Scripting,11:Benewake
// @User: Advanced
// @RebootRequired: True
AP_GROUPINFO("PROTOCOL", 1, AP_CANManager::CANDriver_Params, _driver_type, AP_CANManager::Driver_Type_UAVCAN),

View File

@ -62,6 +62,7 @@ public:
Driver_Type_KDECAN = 8,
Driver_Type_MPPT_PacketDigital = 9,
Driver_Type_Scripting = 10,
Driver_Type_Benewake = 11,
};
void init(void);

View File

@ -27,7 +27,7 @@ const AP_Param::GroupInfo AP_RangeFinder_Benewake_CAN::var_info[] = {
constructor
*/
AP_RangeFinder_Benewake_CAN::AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) :
CANSensor("Benewake", 3072),
CANSensor("Benewake"),
AP_RangeFinder_Backend(_state, _params)
{
AP_Param::setup_object_defaults(this, var_info);

View File

@ -5,7 +5,7 @@
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
class AP_RangeFinder_Benewake_CAN : public CANSensor, public AP_RangeFinder_Backend {
class AP_RangeFinder_Benewake_CAN : public AP_RangeFinder_Backend, public CANSensor {
public:
AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params);