diff --git a/MAVProxy/modules/mavproxy_joystick/controls.py b/MAVProxy/modules/mavproxy_joystick/controls.py index 10ed881b67..c43ed24358 100644 --- a/MAVProxy/modules/mavproxy_joystick/controls.py +++ b/MAVProxy/modules/mavproxy_joystick/controls.py @@ -136,6 +136,8 @@ def value(self): if value != self._last_value: self._last_value = value if value != 0: + if self.invert: + value *= -1 # In my testing the hat is clamped to -1, 0, 1 values only # NOTE: check if this universal self._value += value * self.step @@ -186,7 +188,7 @@ def __init__(self, joystick, controls): elif control['type'] == 'dial': kwargs = {k: control[k] for k in control.keys() - if k in ['outlow', 'outhigh', 'invert', 'step']} + if k in ['outlow', 'outhigh', 'invert', 'step', 'centered']} handler = Dial(self.joystick, control['id'], control['axis'], **kwargs)