mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
SRV_Channel: adapt to changes in AP_BoardConfig_CAN
This commit is contained in:
parent
3b61a31bb4
commit
861e1a0a54
@ -238,8 +238,8 @@ void SRV_Channels::push()
|
|||||||
|
|
||||||
#if HAL_WITH_UAVCAN
|
#if HAL_WITH_UAVCAN
|
||||||
// push outputs to UAVCAN
|
// push outputs to UAVCAN
|
||||||
uint8_t can_num_ifaces = AP_BoardConfig_CAN::get_can_num_ifaces();
|
uint8_t can_num_drivers = AP::can().get_num_drivers();
|
||||||
for (uint8_t i = 0; i < MAX_NUMBER_OF_CAN_DRIVERS && i < can_num_ifaces; i++) {
|
for (uint8_t i = 0; i < can_num_drivers; i++) {
|
||||||
AP_UAVCAN *ap_uavcan = AP_UAVCAN::get_uavcan(i);
|
AP_UAVCAN *ap_uavcan = AP_UAVCAN::get_uavcan(i);
|
||||||
if (ap_uavcan == nullptr) {
|
if (ap_uavcan == nullptr) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user