Skip to content

Commit

Permalink
AP_HAL: add apis setting and tracking transmit timestamp on CAN
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Oct 18, 2023
1 parent 30f8652 commit 7c4090f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libraries/AP_HAL/CANIface.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ class AP_HAL::CANIface
// register a frame callback function
virtual bool register_frame_callback(FrameCb cb);

// set mask and value on packet id to track tx timestamp for
virtual void set_track_tx_timestamp(uint32_t mask, uint32_t value) {}

// get timestamp of last packet sent with matching mask and value
virtual uint64_t get_tracked_tx_timestamp() {
return 0;
}

protected:
virtual int8_t get_iface_num() const = 0;
virtual bool add_to_rx_queue(const CanRxItem &rx_item) = 0;
Expand Down

0 comments on commit 7c4090f

Please sign in to comment.