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 2784917
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions MAVProxy/modules/mavproxy_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,24 @@ def __init__(self, mpstate):
# create the main menu
if mp_util.has_wxpython:
self.menu = MPMenuTop([])
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=[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')]))
items=mavproxy_items))
self.vehicle_menu = MPMenuSubMenu('Vehicle', items=[])
self.add_menu(self.vehicle_menu)

Expand Down

0 comments on commit 2784917

Please sign in to comment.