AP_CANManager: rename more variables, types and defines

This commit is contained in:
Andrew Tridgell 2023-04-08 14:09:10 +10:00
parent 11a2f5ed9c
commit 33df480f87
3 changed files with 6 additions and 6 deletions

View File

@ -34,9 +34,9 @@ const AP_Param::GroupInfo AP_CANManager::CANDriver_Params::var_info[] = {
// @Values: 0:Disabled,1:DroneCAN,4:PiccoloCAN,5:CANTester,6:EFI_NWPMU,7:USD1,8:KDECAN,10:Scripting,11:Benewake,12:Scripting2
// @User: Advanced
// @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_DroneCAN),
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
#if HAL_ENABLE_DRONECAN_DRIVERS
// @Group: UC_
// @Path: ../AP_DroneCAN/AP_DroneCAN.cpp
AP_SUBGROUPPTR(_uavcan, "UC_", 2, AP_CANManager::CANDriver_Params, AP_DroneCAN),

View File

@ -203,8 +203,8 @@ void AP_CANManager::init()
}
// Allocate the set type of Driver
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
if (drv_type[drv_num] == Driver_Type_UAVCAN) {
#if HAL_ENABLE_DRONECAN_DRIVERS
if (drv_type[drv_num] == Driver_Type_DroneCAN) {
_drivers[drv_num] = _drv_param[drv_num]._uavcan = new AP_DroneCAN(drv_num);
if (_drivers[drv_num] == nullptr) {
@ -288,7 +288,7 @@ void AP_CANManager::init()
{
WITH_SEMAPHORE(_sem);
for (uint8_t i = 0; i < HAL_NUM_CAN_IFACES; i++) {
if ((Driver_Type) _drv_param[i]._driver_type.get() == Driver_Type_UAVCAN) {
if ((Driver_Type) _drv_param[i]._driver_type.get() == Driver_Type_DroneCAN) {
_drivers[i] = _drv_param[i]._uavcan = new AP_DroneCAN(i);
if (_drivers[i] == nullptr) {

View File

@ -58,7 +58,7 @@ public:
enum Driver_Type : uint8_t {
Driver_Type_None = 0,
Driver_Type_UAVCAN = 1,
Driver_Type_DroneCAN = 1,
// 2 was KDECAN -- do not re-use
// 3 was ToshibaCAN -- do not re-use
Driver_Type_PiccoloCAN = 4,