Skip to content

Commit

Permalink
mavproxy_link.py: Add ws port configuration
Browse files Browse the repository at this point in the history
* Use a call text dialog handler to allow users to specify custom
  websocket output ports

Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 committed Nov 17, 2024
1 parent 335e1c9 commit c104fee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MAVProxy/modules/mavproxy_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from MAVProxy.modules.lib import mp_util

if mp_util.has_wxpython:
from MAVProxy.modules.lib.mp_menu import MPMenuCallTextDialog
from MAVProxy.modules.lib.mp_menu import MPMenuSubMenu
from MAVProxy.modules.lib.mp_menu import MPMenuItem
from MAVProxy.modules.lib.wx_addlink import MPMenulinkAddDialog
Expand Down Expand Up @@ -124,7 +125,11 @@ def __init__(self, mpstate):
pass
else:
items.append(
MPMenuItem('Start Websocket Server', 'Start Websocket Server', '# output add wsserver:0.0.0.0:56781'))
MPMenuItem('Start Websocket Server', 'Start Websocket Server', '# output add wsserver:0.0.0.0:',
handler=MPMenuCallTextDialog(
title='Websocket Port',
default=56781
)))

self.menu = MPMenuSubMenu('Link', items=items)
self.last_menu_update = 0
Expand Down

0 comments on commit c104fee

Please sign in to comment.