Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_DroneCAN: properly convert timeout to deadline for aux frames #28308

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libraries/AP_DroneCAN/AP_Canard_iface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,13 @@ bool CanardInterface::add_11bit_driver(CANSensor *sensor)
// handler for outgoing frames for auxillary drivers
bool CanardInterface::write_aux_frame(AP_HAL::CANFrame &out_frame, const uint64_t timeout_us)
{
const uint64_t tx_deadline_us = AP_HAL::micros64() + timeout_us;
bool ret = false;
for (uint8_t iface = 0; iface < num_ifaces; iface++) {
if (ifaces[iface] == NULL) {
continue;
}
ret |= ifaces[iface]->send(out_frame, timeout_us, 0) > 0;
ret |= ifaces[iface]->send(out_frame, tx_deadline_us, 0) > 0;
}
return ret;
}
Expand Down
Loading