Skip to content
Prev Previous commit
Next Next commit
Add None handling for first_timestamp
  • Loading branch information
pkess committed Feb 23, 2025
commit d69601849ac0852e522e62e041d141b592ca36b9
2 changes: 1 addition & 1 deletion can/io/trc.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def _format_message(self, msg: Message, channel: int) -> str:

serialized = self._msg_fmt_string.format(
msgnr=self.msgnr,
time=(msg.timestamp - self.first_timestamp) * 1000,
time=(msg.timestamp - (self.first_timestamp or 0.0)) * 1000,
channel=channel,
id=arb_id,
dir="Rx" if msg.is_rx else "Tx",
Expand Down