-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
Up to version 0.2, the two buttons on my SpaceNavigator were sending [1, 0]
(left) and [0, 1]
(right) on button down.
# git checkout 0.2
# python spacenavigator.py
Devices found:
SpaceNavigator
SpaceNavigator found
SpaceNavigator connected to 3Dconnexion Space Navigator version: 1056 [serial: ]
x +0.00 y +0.00 z +0.00 roll +0.00 pitch +0.00 yaw +0.00 t -1.00
buttons=[1, 0] <-- left button down
x +0.00 y +0.00 z +0.00 roll +0.00 pitch +0.00 yaw +0.00 t -1.00
buttons=[0, 0]
x +0.00 y +0.00 z +0.00 roll +0.00 pitch +0.00 yaw +0.00 t -1.00
buttons=[0, 1] <-- right button down
x +0.00 y +0.00 z +0.00 roll +0.00 pitch +0.00 yaw +0.00 t -1.00
buttons=[0, 0]
Since version 0.2.1, the left button sends [0, 1]
, and the right buttons sens [0, 0]
on button down.
# git checkout 0.2.1
# python spacenavigator.py
Devices found:
SpaceNavigator
SpaceNavigator found
9
1
1
1
1
1
1
SpaceNavigator connected to 3Dconnexion Space Navigator version: 1056 [serial: ]
x +0.00 y +0.00 z +0.00 roll +0.00 pitch +0.00 yaw +0.00 t -1.00
x +0.50 y +0.48 z +0.50 roll +0.49 pitch +0.50 yaw +0.50 t +1.51
buttons=[0, 1] <-- left button down
buttons=[0, 0]
buttons=[0, 0] <-- right button down
buttons=[0, 0]
In addition to that, if the button is pressed before any axis is touched, I get an exception:
# git checkout 0.2.1
# python spacenavigator.py
Devices found:
SpaceNavigator
SpaceNavigator found
9
1
1
1
1
1
1
SpaceNavigator connected to 3Dconnexion Space Navigator version: 1056 [serial: ]
buttons=[]
Exception in thread Thread-1:
Traceback (most recent call last):
File "spacenavigator.py", line 118, in <lambda>
button_handler = lambda value, id, button_id=usage : self.button_handler(button_id, value)
File "spacenavigator.py", line 151, in button_handler
self.button_callback(self.tuple_state, self.tuple_state.buttons)
File "spacenavigator.py", line 412, in toggle_led
if buttons[0] == 1:
IndexError: list index out of range
Metadata
Metadata
Assignees
Labels
No labels