Skip to content

Ignore error frames in can.player by default #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions can/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ def main():
action="store_false",
)

parser.add_argument(
"--error-frames",
help="Also send error frames to the interface.",
action="store_true",
)

parser.add_argument(
"-g",
"--gap",
Expand Down Expand Up @@ -111,6 +117,8 @@ def main():
]
can.set_logging_level(logging_level_name)

error_frames = results.error_frames

config = {"single_handle": True}
if results.interface:
config["interface"] = results.interface
Expand All @@ -132,6 +140,8 @@ def main():

try:
for m in in_sync:
if m.is_error_frame and not error_frames:
continue
if verbosity >= 3:
print(m)
bus.send(m)
Expand Down