Commit 79168def authored by Michael König (Student)'s avatar Michael König (Student)
Browse files

added paramt to modifiy inital line visiblity

parent ff6a55aa
...@@ -60,7 +60,10 @@ class LiveGui(GuiBase): ...@@ -60,7 +60,10 @@ class LiveGui(GuiBase):
def startupCheck(self): def startupCheck(self):
for val in VALUES_TO_PLOT: for val in VALUES_TO_PLOT:
self.lineVisibility[val] = True if((len(self.options.initialLineVisibility) < 1) or (val in self.options.initialLineVisibility)):
self.lineVisibility[val] = True
else:
self.lineVisibility[val] = False
def pause(self, event): def pause(self, event):
"""Toggles pause flag.""" """Toggles pause flag."""
......
...@@ -209,17 +209,15 @@ def parse_options(): ...@@ -209,17 +209,15 @@ def parse_options():
type=float, type=float,
default=0.1) default=0.1)
# Filter
parser.add_argument( parser.add_argument(
"-p", "-l",
"--port", "--line-visibility",
help="Filter by port. Multiple occurrences possible (" + str(DEFAULT_FILTER_PORT) + ")", help="List of initially visible value-lines - currently available: " + ", ".join(VALUES_TO_PLOT) + " (default: empty = all visible)",
dest="filterPorts", dest="initialLineVisibility",
action='append', action='append',
type=int, type=str,
default=[]) default=[])
parser.add_argument( parser.add_argument(
"-d", "-d",
"--debug", help="Debug mode - ignores quiet mode (default: false)", "--debug", help="Debug mode - ignores quiet mode (default: false)",
...@@ -234,6 +232,16 @@ def parse_options(): ...@@ -234,6 +232,16 @@ def parse_options():
dest="quiet", dest="quiet",
default=False) default=False)
parser.add_argument(
"-p",
"--port",
help="Filter by port. Multiple occurrences possible (" + str(DEFAULT_FILTER_PORT) + ")",
dest="filterPorts",
action='append',
type=int,
default=[])
parser.add_argument( parser.add_argument(
"--version", "--version",
help="Print version information", help="Print version information",
...@@ -241,6 +249,8 @@ def parse_options(): ...@@ -241,6 +249,8 @@ def parse_options():
dest="showVersion", dest="showVersion",
default=False) default=False)
options = parser.parse_args() options = parser.parse_args()
return options return options
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment