Skip to content

Commit

Permalink
console: make public after init
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Oct 3, 2024
1 parent e63daf3 commit ed65346
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MAVProxy/modules/mavproxy_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, fmt, expression, row):

class ConsoleModule(mp_module.MPModule):
def __init__(self, mpstate):
super(ConsoleModule, self).__init__(mpstate, "console", "GUI console", public=True, multi_vehicle=True)
super(ConsoleModule, self).__init__(mpstate, "console", "GUI console", public=False, multi_vehicle=True)
self.in_air = False
self.start_time = 0.0
self.total_time = 0.0
Expand Down Expand Up @@ -97,6 +97,9 @@ def __init__(self, mpstate):
self.vehicle_menu = MPMenuSubMenu('Vehicle', items=[])
self.add_menu(self.vehicle_menu)

# make public after init to prevent race conditions
self.make_public()

def cmd_console(self, args):
usage = 'usage: console <add|list|remove|menu|set>'
if len(args) < 1:
Expand Down

0 comments on commit ed65346

Please sign in to comment.