Skip to content

Commit ebae360

Browse files
authored
Merge pull request hardbyte#1271 from hartkopp/develop
[IO][canutils]: use common CAN interface names in generated logfile
2 parents 113ca4e + 56fb131 commit ebae360

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

can/io/canutils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ def on_message_received(self, msg):
160160
timestamp = msg.timestamp
161161

162162
channel = msg.channel if msg.channel is not None else self.channel
163+
if isinstance(channel, int) or isinstance(channel, str) and channel.isdigit():
164+
channel = f"can{channel}"
163165

164166
framestr = "(%f) %s" % (timestamp, channel)
165167

0 commit comments

Comments
 (0)