Skip to content

Commit

Permalink
AP_DroneCAN: add activity LED for DroneCAN
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Jan 22, 2024
1 parent 8a4943f commit eaebdf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_DroneCAN/AP_Canard_iface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ bool CanardInterface::respond(uint8_t destination_node_id, const Canard::Transfe
}

void CanardInterface::onTransferReception(CanardInstance* ins, CanardRxTransfer* transfer) {
#ifdef HAL_GPIO_PIN_LED_CAN1
palToggleLine(HAL_GPIO_PIN_LED_CAN1);
#endif
CanardInterface* iface = (CanardInterface*) ins->user_reference;
iface->handle_message(*transfer);
}
Expand Down

0 comments on commit eaebdf5

Please sign in to comment.