From fae631bf12c4579237e4a4a9a7436f73a9d9d501 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 8 Oct 2018 22:22:34 +0200 Subject: [PATCH 1/2] Fixed license header Fixes #450 --- can/viewer.py | 16 +++++++++++++++- test/test_viewer.py | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/can/viewer.py b/can/viewer.py index 7b323e559..283433ed8 100644 --- a/can/viewer.py +++ b/can/viewer.py @@ -1,6 +1,20 @@ # coding: utf-8 # -# Copyright (C) 2018 Kristian Sloth Lauszus. All rights reserved. +# Copyright (C) 2018 Kristian Sloth Lauszus. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Contact information # ------------------- diff --git a/test/test_viewer.py b/test/test_viewer.py index 3665f157b..c4b7aa45f 100644 --- a/test/test_viewer.py +++ b/test/test_viewer.py @@ -1,7 +1,21 @@ #!/usr/bin/python # coding: utf-8 # -# Copyright (C) 2018 Kristian Sloth Lauszus. All rights reserved. +# Copyright (C) 2018 Kristian Sloth Lauszus. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Contact information # ------------------- From 3e7b5e13ea99dbfe356f706b2bf7d3eeec1993d9 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 8 Oct 2018 22:36:26 +0200 Subject: [PATCH 2/2] Fixed help text for the "--filter" argument, as the filters should be separated by spaces --- can/viewer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/can/viewer.py b/can/viewer.py index 283433ed8..660dce62c 100644 --- a/can/viewer.py +++ b/can/viewer.py @@ -384,11 +384,11 @@ def parse_args(args): metavar='{:,:::...:,file.txt}', nargs=argparse.ONE_OR_MORE, default='') - optional.add_argument('-f', '--filter', help='R|Comma separated CAN filters for the given CAN interface:' + optional.add_argument('-f', '--filter', help='R|Space separated CAN filters for the given CAN interface:' '\n : (matches when & mask == can_id & mask)' '\n ~ (matches when & mask != can_id & mask)' - '\nFx to show only frames with ID 0x100 to 0x103:' - '\n python -m can.viewer -f 100:7FC' + '\nFx to show only frames with ID 0x100 to 0x103 and 0x200 to 0x20F:' + '\n python -m can.viewer -f 100:7FC 200:7F0' '\nNote that the ID and mask are alway interpreted as hex values', metavar='{:,~}', nargs=argparse.ONE_OR_MORE, default='')