4141class GreenwaveNcursesFrontend (Node ):
4242 """Ncurses frontend for Greenwave Monitor."""
4343
44- def __init__ (self , show_only_monitored : bool = False ):
44+ def __init__ (self , hide_unmonitored : bool = False ):
4545 """Initialize the ncurses frontend node."""
4646 super ().__init__ ('greenwave_ncurses_frontend' )
4747
@@ -60,7 +60,7 @@ def __init__(self, show_only_monitored: bool = False):
6060 self .input_buffer = ''
6161 self .status_message = ''
6262 self .status_timeout = 0
63- self .show_only_monitored = show_only_monitored
63+ self .hide_unmonitored = hide_unmonitored
6464
6565 # Initialize UI adaptor
6666 self .ui_adaptor = GreenwaveUiAdaptor (self )
@@ -99,7 +99,7 @@ def update_visible_topics(self):
9999 """Update the visible topics list based on current filters."""
100100 all_topic_names = list (self .all_topics )
101101
102- if self .show_only_monitored and self .ui_adaptor :
102+ if self .hide_unmonitored and self .ui_adaptor :
103103 # Filter to only show topics that have diagnostic data (are being monitored)
104104 filtered_topics = []
105105 for topic_name in all_topic_names :
@@ -290,10 +290,10 @@ def curses_main(stdscr, node):
290290 status_message = f'Error: { msg } '
291291 status_timeout = current_time + 3.0
292292 elif key == ord ('h' ) or key == ord ('H' ):
293- node .show_only_monitored = not node .show_only_monitored
293+ node .hide_unmonitored = not node .hide_unmonitored
294294 with node .topics_lock :
295295 node .update_visible_topics ()
296- mode_text = 'monitored only' if node .show_only_monitored else 'all topics'
296+ mode_text = 'monitored only' if node .hide_unmonitored else 'all topics'
297297 status_message = f'Showing { mode_text } '
298298 status_timeout = current_time + 3.0
299299
@@ -435,7 +435,7 @@ def curses_main(stdscr, node):
435435 status_line = ("Format: Hz [tolerance%] - Examples: '30' (30Hz±5% default) "
436436 "or '30 10' (30Hz±10%) - ESC=cancel, Enter=confirm" )
437437 else :
438- if node .show_only_monitored :
438+ if node .hide_unmonitored :
439439 mode_text = 'monitored only'
440440 mode_help_text = 'show unmonitored'
441441 else :
@@ -460,9 +460,9 @@ def parse_args(args=None):
460460 description = 'Ncurses-based frontend for Greenwave Monitor'
461461 )
462462 parser .add_argument (
463- '--show-only-monitored ' ,
463+ '--hide-unmonitored ' ,
464464 action = 'store_true' ,
465- help = 'Show only monitored topics on initialization'
465+ help = 'Hide unmonitored topics on initialization'
466466 )
467467 return parser .parse_known_args (args )
468468
@@ -471,7 +471,7 @@ def main(args=None):
471471 """Entry point for the ncurses frontend application."""
472472 parsed_args , ros_args = parse_args (args )
473473 rclpy .init (args = ros_args )
474- node = GreenwaveNcursesFrontend (show_only_monitored = parsed_args .show_only_monitored )
474+ node = GreenwaveNcursesFrontend (hide_unmonitored = parsed_args .hide_unmonitored )
475475 thread = None
476476
477477 def signal_handler (signum , frame ):
0 commit comments