Skip to content

Commit

Permalink
mavproxy_console.py: Add Start Websocket Server to the MAVProxy console
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 committed Nov 11, 2024
1 parent b7d20f7 commit 09a574d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions MAVProxy/modules/mavproxy_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,23 @@ def __init__(self, mpstate):
# create the main menu
if mp_util.has_wxpython:
self.menu = MPMenuTop([])
self.add_menu(MPMenuSubMenu('MAVProxy',
items=[MPMenuItem('Settings', 'Settings', 'menuSettings'),
MPMenuItem('Show Map', 'Load Map', '# module load map'),
MPMenuItem('Show HUD', 'Load HUD', '# module load horizon'),
MPMenuItem('Show Checklist', 'Load Checklist', '# module load checklist')]))
mavproxy_items = [
MPMenuItem('Settings', 'Settings', 'menuSettings'),
MPMenuItem('Show Map', 'Load Map', '# module load map'),
MPMenuItem('Show HUD', 'Load HUD', '# module load horizon'),
MPMenuItem('Show Checklist', 'Load Checklist', '# module load checklist'),
]

# wsproto is not installed by default.
# Only add the menu if it's available.
try:
import wsproto
except ImportError:
pass
else:
mavproxy_items.append(MPMenuItem('Start Websocket Server', 'Start Websocket Server', '# output add wsserver:0.0.0.0:56781'))

self.add_menu(MPMenuSubMenu('MAVProxy', items=mavproxy_items))
self.vehicle_menu = MPMenuSubMenu('Vehicle', items=[])
self.add_menu(self.vehicle_menu)

Expand Down

0 comments on commit 09a574d

Please sign in to comment.