mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
AP_CANManager:replace config_error with allocation_error
This commit is contained in:
parent
ae4d368267
commit
f5ee2a3a50
@ -199,7 +199,7 @@ void AP_CANManager::init()
|
|||||||
_drivers[drv_num] = _drv_param[drv_num]._uavcan = new AP_UAVCAN;
|
_drivers[drv_num] = _drv_param[drv_num]._uavcan = new AP_UAVCAN;
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
AP_BoardConfig::config_error("Failed to allocate uavcan %d\n\r", i + 1);
|
AP_BoardConfig::allocation_error("Failed to allocate uavcan %d\n\r", i + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ void AP_CANManager::init()
|
|||||||
_drivers[drv_num] = _drv_param[drv_num]._kdecan = new AP_KDECAN;
|
_drivers[drv_num] = _drv_param[drv_num]._kdecan = new AP_KDECAN;
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
AP_BoardConfig::config_error("Failed to allocate KDECAN %d\n\r", drv_num + 1);
|
AP_BoardConfig::allocation_error("Failed to allocate KDECAN %d\n\r", drv_num + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ void AP_CANManager::init()
|
|||||||
_drivers[drv_num] = new AP_ToshibaCAN;
|
_drivers[drv_num] = new AP_ToshibaCAN;
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
AP_BoardConfig::config_error("Failed to allocate ToshibaCAN %d\n\r", drv_num + 1);
|
AP_BoardConfig::allocation_error("Failed to allocate ToshibaCAN %d\n\r", drv_num + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (drv_type[drv_num] == Driver_Type_PiccoloCAN) {
|
} else if (drv_type[drv_num] == Driver_Type_PiccoloCAN) {
|
||||||
@ -228,7 +228,7 @@ void AP_CANManager::init()
|
|||||||
_drivers[drv_num] = _drv_param[drv_num]._piccolocan = new AP_PiccoloCAN;
|
_drivers[drv_num] = _drv_param[drv_num]._piccolocan = new AP_PiccoloCAN;
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
AP_BoardConfig::config_error("Failed to allocate PiccoloCAN %d\n\r", drv_num + 1);
|
AP_BoardConfig::allocation_error("Failed to allocate PiccoloCAN %d\n\r", drv_num + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ void AP_CANManager::init()
|
|||||||
_drivers[drv_num] = _drv_param[drv_num]._testcan = new CANTester;
|
_drivers[drv_num] = _drv_param[drv_num]._testcan = new CANTester;
|
||||||
|
|
||||||
if (_drivers[drv_num] == nullptr) {
|
if (_drivers[drv_num] == nullptr) {
|
||||||
AP_BoardConfig::config_error("Failed to allocate CANTester %d\n\r", drv_num + 1);
|
AP_BoardConfig::allocation_error("Failed to allocate CANTester %d\n\r", drv_num + 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
AP_Param::load_object_from_eeprom((CANTester*)_drivers[drv_num], CANTester::var_info);
|
AP_Param::load_object_from_eeprom((CANTester*)_drivers[drv_num], CANTester::var_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user