Skip to content

Commit 1ac5510

Browse files
christiansandbergfelixdivo
authored andcommitted
Ignore error frames in can.player by default
Fixes #683
1 parent 908fd87 commit 1ac5510

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

can/player.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ def main():
7373
action="store_false",
7474
)
7575

76+
parser.add_argument(
77+
"--error-frames",
78+
help="Also send error frames to the interface.",
79+
action="store_true",
80+
)
81+
7682
parser.add_argument(
7783
"-g",
7884
"--gap",
@@ -111,6 +117,8 @@ def main():
111117
]
112118
can.set_logging_level(logging_level_name)
113119

120+
error_frames = results.error_frames
121+
114122
config = {"single_handle": True}
115123
if results.interface:
116124
config["interface"] = results.interface
@@ -132,6 +140,8 @@ def main():
132140

133141
try:
134142
for m in in_sync:
143+
if m.is_error_frame and not error_frames:
144+
continue
135145
if verbosity >= 3:
136146
print(m)
137147
bus.send(m)

0 commit comments

Comments
 (0)