Skip to content

Commit

Permalink
FlightTab: Assisted flight fix
Browse files Browse the repository at this point in the history
Booleans should be encoded as ints and not strings.
Why this worked with pyqt5 is still obscured but it looks like its been a change.
And regardless bools in other parts of this code is encoded as integers, so keeping it unified is a good idea
  • Loading branch information
ToveRumar committed Apr 25, 2024
1 parent 80f6ef6 commit 771f440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfclient/ui/tabs/FlightTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def _assisted_control_updated(self, enabled):
self.targetHeight.setEnabled(enabled)
print('Chaning enable for target height: %s' % enabled)
else:
self._helper.cf.param.set_value("flightmode.althold", str(enabled))
self._helper.cf.param.set_value("flightmode.althold", int(enabled))

def alt1_updated(self, state):
if state:
Expand Down

0 comments on commit 771f440

Please sign in to comment.