Skip to content

Commit f432524

Browse files
committed
Update help button based on toggle
Signed-off-by: Blake McHale <[email protected]>
1 parent 559a4e1 commit f432524

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

greenwave_monitor/greenwave_monitor/ncurses_frontend.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,16 @@ 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-
mode_text = 'monitored only' if node.show_only_monitored else 'all topics'
438+
if node.show_only_monitored:
439+
mode_text = 'monitored only'
440+
mode_help_text = 'show unmonitored'
441+
else:
442+
mode_text = 'all topics'
443+
mode_help_text = 'hide unmonitored'
439444
status_line = (
440445
f'Showing {start_idx + 1} - {num_shown} of {len(visible_topics)} '
441446
f'topics ({mode_text}). Enter=toggle, f=set freq, c=clear freq, '
442-
f'h=hide unmonitored, q=quit')
447+
f'h={mode_help_text}, q=quit')
443448

444449
try:
445450
stdscr.addstr(height - 2, 0, status_line[:width - 1])

greenwave_monitor/scripts/ncurses_dashboard

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ show_help() {
4040
echo "MONITOR_ARGS are passed directly to the greenwave_monitor node"
4141
echo ""
4242
echo "Controls in ncurses interface:"
43-
echo " a = Add topic to monitoring"
44-
echo " r = Remove selected topic"
45-
echo " f = Set expected frequency (format: topic_name hz tolerance)"
43+
echo " enter/space = toggle topic monitoring"
44+
echo " f = Set expected frequency (format: hz tolerance%) [default: 30Hz±5%]"
4645
echo " c = Clear frequency settings for selected topic"
46+
echo " h = Toggle showing unmonitored topics"
4747
echo " ↑/↓ = Navigate topics"
4848
echo " q = Quit"
4949
}

0 commit comments

Comments
 (0)