mirror of
https://github.com/pdxlocations/contact.git
synced 2026-08-08 09:53:08 +02:00
missing menu strings
This commit is contained in:
@@ -314,6 +314,7 @@ def main(stdscr):
|
||||
curses.init_pair(2, curses.COLOR_YELLOW, curses.COLOR_BLACK)
|
||||
curses.init_pair(3, curses.COLOR_BLACK, curses.COLOR_WHITE)
|
||||
curses.init_pair(4, curses.COLOR_WHITE, curses.COLOR_BLACK)
|
||||
curses.init_pair(5, curses.COLOR_RED, curses.COLOR_BLACK)
|
||||
|
||||
# Calculate window max dimensions
|
||||
height, width = stdscr.getmaxyx()
|
||||
|
||||
+11
-6
@@ -21,6 +21,10 @@ def generate_menu_from_protobuf(message_instance):
|
||||
elif field_descriptor.type == 13: # Field type 13 corresponds to UINT32
|
||||
# If the field is UINT32, include an example value
|
||||
menu[field_name] = {"Example Value": None}
|
||||
elif field_descriptor.type == 9: # Field type 9 corresponds to TYPE_STRING
|
||||
# If the field is a string, include an example value
|
||||
menu[field_name] = {"Example String": None}
|
||||
|
||||
return menu
|
||||
|
||||
|
||||
@@ -29,10 +33,6 @@ def nested_menu(stdscr, menu, interface):
|
||||
current_menu = menu
|
||||
prev_menu = None
|
||||
|
||||
# Define custom colors
|
||||
curses.init_pair(5, curses.COLOR_RED, curses.COLOR_BLACK) # Red color
|
||||
curses.init_pair(6, curses.COLOR_CYAN, curses.COLOR_BLACK) # Cyan color
|
||||
|
||||
while True:
|
||||
stdscr.clear()
|
||||
stdscr.border()
|
||||
@@ -111,7 +111,8 @@ def settings(stdscr, interface):
|
||||
# Add top-level menu items
|
||||
top_level_menu = {
|
||||
"Radio Settings": radio_config,
|
||||
"Module Settings": module_config,
|
||||
# "Module Settings": module_config,
|
||||
"Module Settings": None,
|
||||
"Reboot": None,
|
||||
"Reset NodeDB": None,
|
||||
"Shutdown": None,
|
||||
@@ -137,4 +138,8 @@ def settings_shutdown(interface):
|
||||
interface.getNode('^local').shutdown()
|
||||
|
||||
def settings_factory_reset(interface):
|
||||
interface.getNode('^local').factory_reset()
|
||||
interface.getNode('^local').factory_reset()
|
||||
|
||||
# ourNode = interface.getNode('^local')
|
||||
# ourNode.localConfig.lora.modem_preset = 'LONG_FAST'
|
||||
# ourNode.writeConfig("lora")
|
||||
Reference in New Issue
Block a user