Skip to content

Commit 7e118df

Browse files
committed
Merge branch 'BenGardiner-software_timestamps' into develop
2 parents d1909f8 + 711e437 commit 7e118df

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

candle/candle_bus.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import time
12
from typing import Optional, Tuple, List, Union
23
import can
34
from can.typechecking import CanFilters, AutoDetectedConfig
@@ -140,8 +141,9 @@ def _recv_internal(
140141
pass
141142

142143
if frame is not None:
144+
timestamp = frame.timestamp if self._channel.feature.hardware_timestamp else time.monotonic()
143145
msg = can.Message(
144-
timestamp=frame.timestamp,
146+
timestamp=timestamp,
145147
arbitration_id=frame.can_id,
146148
is_extended_id=frame.frame_type.extended_id,
147149
is_remote_frame=frame.frame_type.remote_frame,

0 commit comments

Comments
 (0)