mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: don't consider a MAVCAN send failure as a send failure
this prevents duplicate sends if MAVCAN buffer is full
This commit is contained in:
parent
f0a0a4cfa9
commit
0cfd9c2ed5
|
@ -397,7 +397,10 @@ int16_t CANIface::send(const AP_HAL::CANFrame& frame, uint64_t tx_deadline,
|
|||
pending_tx_[index].pushed = false;
|
||||
}
|
||||
|
||||
return AP_HAL::CANIface::send(frame, tx_deadline, flags);
|
||||
// also send on MAVCAN, but don't consider it an error if we can't get the MAVCAN out
|
||||
AP_HAL::CANIface::send(frame, tx_deadline, flags);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int16_t CANIface::receive(AP_HAL::CANFrame& out_frame, uint64_t& out_timestamp_us, CanIOFlags& out_flags)
|
||||
|
|
|
@ -360,7 +360,10 @@ int16_t CANIface::send(const AP_HAL::CANFrame& frame, uint64_t tx_deadline,
|
|||
txi.pushed = false;
|
||||
}
|
||||
|
||||
return AP_HAL::CANIface::send(frame, tx_deadline, flags);
|
||||
// also send on MAVCAN, but don't consider it an error if we can't send
|
||||
AP_HAL::CANIface::send(frame, tx_deadline, flags);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int16_t CANIface::receive(AP_HAL::CANFrame& out_frame, uint64_t& out_timestamp_us, CanIOFlags& out_flags)
|
||||
|
|
Loading…
Reference in New Issue