AP_CANManager: support Benewake CAN

This commit is contained in:
Andrew Tridgell 2021-11-12 21:12:11 +11:00 committed by Randy Mackay
parent f91adfd146
commit cfc25c4161
4 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

@ -27,7 +27,7 @@ const AP_Param::GroupInfo AP_RangeFinder_Benewake_CAN::var_info[] = {
constructor constructor
*/ */
AP_RangeFinder_Benewake_CAN::AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params) : 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_RangeFinder_Backend(_state, _params)
{ {
AP_Param::setup_object_defaults(this, var_info); AP_Param::setup_object_defaults(this, var_info);

View File

@ -5,7 +5,7 @@
#if HAL_MAX_CAN_PROTOCOL_DRIVERS #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: public:
AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params); AP_RangeFinder_Benewake_CAN(RangeFinder::RangeFinder_State &_state, AP_RangeFinder_Params &_params);