Skip to content

Commit 0b22c7f

Browse files
committed
Fix the hat handler description and make use of outlow/high parameters
1 parent 4bc659b commit 0b22c7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MAVProxy/modules/mavproxy_joystick/controls.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def value(self):
8585
class Hat (Control):
8686
'''A Hat maps one axis of a hat as if it were a toggle switch.
8787
When the axis goes negative, the corresponding channel value is
88-
set to `outputlow`. When the axis goes positive, the value is set
89-
to `outputhigh`. No change is made when the axis returns to 0.'''
88+
set to `outlow`. When the axis goes positive, the value is set
89+
to `outhigh`. No change is made when the axis returns to 0.'''
9090

9191
def __init__(self, joystick, id, axis, **kwargs):
9292
super(Hat, self).__init__(joystick, **kwargs)
@@ -181,7 +181,7 @@ def __init__(self, joystick, controls):
181181
for k in control.keys()
182182
if k in ['outlow', 'outhigh']}
183183

184-
handler = Hat(self.joystick, control['id'], control['axis'])
184+
handler = Hat(self.joystick, control['id'], control['axis'], **kwargs)
185185

186186
elif control['type'] == 'dial':
187187
kwargs = {k: control[k]

0 commit comments

Comments
 (0)