Skip to content

Commit

Permalink
Gyro action: If Action is a bare SensitivityModifier, set speeds in t…
Browse files Browse the repository at this point in the history
…he UI for it too, partially fixes #27
  • Loading branch information
C0rn3j committed Sep 22, 2024
1 parent ddd376e commit 9f7dc8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scc/gui/ae/gyro_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def load(self) -> None:
self._recursing = False


def set_action(self, mode, action):
def set_action(self, mode: int, action) -> None:
if self.handles(mode, action):
if isinstance(action, NoAction):
self.select_gyro_output("none")
Expand Down Expand Up @@ -101,6 +101,8 @@ def set_action(self, mode, action):
self.select_yaw_roll(YAW)
else:
self.select_yaw_roll(ROLL)
if isinstance(action, SensitivityModifier):
self.editor.set_sensitivity(*action.speeds)
elif isinstance(action, GyroAction):
ap = action.parameters
if len(ap) == 2:
Expand Down

0 comments on commit 9f7dc8b

Please sign in to comment.