Skip to content

Commit

Permalink
Merge pull request #542 from bitcraze/command-flight-no-control
Browse files Browse the repository at this point in the history
updated flightcommand buttons to gray out if controller is attached
  • Loading branch information
knmcguire authored Dec 6, 2021
2 parents 6c8a1b0 + 5ac473a commit 33058df
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cfclient/ui/tabs/FlightTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ def _update_flight_commander(self, connected):
'You need a positioning deck to use Command Based Flight'
)
self.commanderBox.setEnabled(False)
return

# To prevent conflicting commands from the controller and the flight panel
if JoystickReader().available_devices():
self.commanderBox.setToolTip(
'Cant use both an controller and Command Based Flight'
)
self.commanderBox.setEnabled(False)
return

def connected(self, linkURI):
# MOTOR & THRUST
Expand Down

0 comments on commit 33058df

Please sign in to comment.