Skip to content

Commit d793ed5

Browse files
Ryanf55peterbarker
authored andcommitted
mavproxy_link.py: Add ws port configuration
* Use a call text dialog handler to allow users to specify custom websocket output ports Signed-off-by: Ryan Friedman <[email protected]>
1 parent 335e1c9 commit d793ed5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

MAVProxy/modules/mavproxy_link.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from MAVProxy.modules.lib import mp_util
3131

3232
if mp_util.has_wxpython:
33+
from MAVProxy.modules.lib.mp_menu import MPMenuCallTextDialog
3334
from MAVProxy.modules.lib.mp_menu import MPMenuSubMenu
3435
from MAVProxy.modules.lib.mp_menu import MPMenuItem
3536
from MAVProxy.modules.lib.wx_addlink import MPMenulinkAddDialog
@@ -124,7 +125,11 @@ def __init__(self, mpstate):
124125
pass
125126
else:
126127
items.append(
127-
MPMenuItem('Start Websocket Server', 'Start Websocket Server', '# output add wsserver:0.0.0.0:56781'))
128+
MPMenuItem('Start Websocket Server', 'Start Websocket Server', '# output add wsserver:0.0.0.0:',
129+
handler=MPMenuCallTextDialog(
130+
title='Websocket Port',
131+
default=56781
132+
)))
128133

129134
self.menu = MPMenuSubMenu('Link', items=items)
130135
self.last_menu_update = 0

0 commit comments

Comments
 (0)