Browse Source

AP_ToshibaCAN: send aborts on error

avoids flooding the bus when trying to send to ESCs that are not connected
master
Randy Mackay 6 years ago
parent
commit
73850f7a06
  1. 2
      libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp

2
libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp

@ -243,7 +243,7 @@ bool AP_ToshibaCAN::write_frame(uavcan::CanFrame &out_frame, uavcan::MonotonicTi @@ -243,7 +243,7 @@ bool AP_ToshibaCAN::write_frame(uavcan::CanFrame &out_frame, uavcan::MonotonicTi
} while (!inout_mask.write);
// send frame and return success
return (_can_driver->getIface(CAN_IFACE_INDEX)->send(out_frame, timeout, 0) == 1);
return (_can_driver->getIface(CAN_IFACE_INDEX)->send(out_frame, timeout, uavcan::CanIOFlagAbortOnError) == 1);
}
// called from SRV_Channels

Loading…
Cancel
Save