AP_KDECAN: move and rename CAN Driver_Type enumeration

This commit is contained in:
Peter Barker 2023-04-18 17:24:17 +10:00 committed by Peter Barker
parent b6cb47d3cd
commit 04feb98091
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ void AP_KDECAN::init()
}
for (uint8_t i = 0; i < HAL_NUM_CAN_IFACES; i++) {
if (CANSensor::get_driver_type(i) == AP_CANManager::Driver_Type_KDECAN) {
if (CANSensor::get_driver_type(i) == AP_CAN::Protocol::KDECAN) {
_driver = new AP_KDECAN_Driver();
return;
}
@ -79,7 +79,7 @@ void AP_KDECAN::update()
AP_KDECAN_Driver::AP_KDECAN_Driver() : CANSensor("KDECAN")
{
register_driver(AP_CANManager::Driver_Type_KDECAN);
register_driver(AP_CAN::Protocol::KDECAN);
// start thread for receiving and sending CAN frames. Tests show we use about 640 bytes of stack
hal.scheduler->thread_create(FUNCTOR_BIND_MEMBER(&AP_KDECAN_Driver::loop, void), "kdecan", 2048, AP_HAL::Scheduler::PRIORITY_CAN, 0);