You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add changed byte highlighting to viewer.py (#1159)
* Added optional byte highlighting to viewer
Added optional byte highlighting that can be toggled using the shortcut key 'h'
* Some black formatting changes
* Final black formatting
* Fixed viewer bug
Fix for the following error since the introduction of #1151 / #1142
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/python-can/can/viewer.py", line 582, in <module>
main()
File "/home/pi/python-can/can/viewer.py", line 573, in main
bus = _create_bus(parsed_args, **additional_config, app_name="python-can viewer")
File "/home/pi/python-can/can/logger.py", line 105, in _create_bus
if parsed_args.app_name:
AttributeError: 'Namespace' object has no attribute 'app_name'
* Update scripts.rst
update viewer documentations
* Update scripts.rst
* Update scripts.rst
arrange keyboard shortcuts into bulleted list
* Update scripts.rst
* Update can/viewer.py
Co-authored-by: Felix Divo <[email protected]>
* Better description.
Add extra length to other lines in the help text so the border lines up.
* Update test_viewer.py
Add test coverage for some of the new byte highlighting functions.
* Use _create_base_argument_parser in viewer.py
Change standard arguments definition to be defined using logger._create_base_argument_parser instead of manually defining them in this module.
Co-authored-by: Felix Divo <[email protected]>
Copy file name to clipboardExpand all lines: doc/scripts.rst
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,21 @@ A screenshot of the application can be seen below:
28
28
.. image:: images/viewer.png
29
29
:width:100%
30
30
31
-
The first column is the number of times a frame with the particular ID that has been received, next is the timestamp of the frame relative to the first received message. The third column is the time between the current frame relative to the previous one. Next is the length of the frame, the data and then the decoded data converted according to the ``-d`` argument. The top red row indicates an error frame.
31
+
The first column is the number of times a frame with the particular ID that has been received, next is the timestamp of the frame relative to the first received message. The third column is the time between the current frame relative to the previous one. Next is the length of the frame, the data and then the decoded data converted according to the ``-d`` argument. The top red row indicates an error frame.
32
+
There are several keyboard shortcuts that can be used with the viewer script, they function as follows:
33
+
34
+
* ESCAPE - Quit the viewer script
35
+
* q - as ESCAPE
36
+
* c - Clear the stored frames
37
+
* s - Sort the stored frames
38
+
* h - Toggle highlighting of changed bytes in the data field - see the below image
0 commit comments