mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
AP_CANManager: rename more variables, types and defines
This commit is contained in:
parent
11a2f5ed9c
commit
33df480f87
@ -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
|
// @Values: 0:Disabled,1:DroneCAN,4:PiccoloCAN,5:CANTester,6:EFI_NWPMU,7:USD1,8:KDECAN,10:Scripting,11:Benewake,12:Scripting2
|
||||||
// @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_DroneCAN),
|
||||||
|
|
||||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
#if HAL_ENABLE_DRONECAN_DRIVERS
|
||||||
// @Group: UC_
|
// @Group: UC_
|
||||||
// @Path: ../AP_DroneCAN/AP_DroneCAN.cpp
|
// @Path: ../AP_DroneCAN/AP_DroneCAN.cpp
|
||||||
AP_SUBGROUPPTR(_uavcan, "UC_", 2, AP_CANManager::CANDriver_Params, AP_DroneCAN),
|
AP_SUBGROUPPTR(_uavcan, "UC_", 2, AP_CANManager::CANDriver_Params, AP_DroneCAN),
|
||||||
|
@ -203,8 +203,8 @@ void AP_CANManager::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allocate the set type of Driver
|
// Allocate the set type of Driver
|
||||||
#if HAL_ENABLE_LIBUAVCAN_DRIVERS
|
#if HAL_ENABLE_DRONECAN_DRIVERS
|
||||||
if (drv_type[drv_num] == Driver_Type_UAVCAN) {
|
if (drv_type[drv_num] == Driver_Type_DroneCAN) {
|
||||||
_drivers[drv_num] = _drv_param[drv_num]._uavcan = new AP_DroneCAN(drv_num);
|
_drivers[drv_num] = _drv_param[drv_num]._uavcan = new AP_DroneCAN(drv_num);
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
@ -288,7 +288,7 @@ void AP_CANManager::init()
|
|||||||
{
|
{
|
||||||
WITH_SEMAPHORE(_sem);
|
WITH_SEMAPHORE(_sem);
|
||||||
for (uint8_t i = 0; i < HAL_NUM_CAN_IFACES; i++) {
|
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);
|
_drivers[i] = _drv_param[i]._uavcan = new AP_DroneCAN(i);
|
||||||
|
|
||||||
if (_drivers[i] == nullptr) {
|
if (_drivers[i] == nullptr) {
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
|
|
||||||
enum Driver_Type : uint8_t {
|
enum Driver_Type : uint8_t {
|
||||||
Driver_Type_None = 0,
|
Driver_Type_None = 0,
|
||||||
Driver_Type_UAVCAN = 1,
|
Driver_Type_DroneCAN = 1,
|
||||||
// 2 was KDECAN -- do not re-use
|
// 2 was KDECAN -- do not re-use
|
||||||
// 3 was ToshibaCAN -- do not re-use
|
// 3 was ToshibaCAN -- do not re-use
|
||||||
Driver_Type_PiccoloCAN = 4,
|
Driver_Type_PiccoloCAN = 4,
|
||||||
|
Loading…
Reference in New Issue
Block a user