File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
BLE_Apple_Watch_Controller Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 85
85
# while BLE connected
86
86
while ble .connected :
87
87
position = encoder .position
88
- # if the encoder is turned to the right
89
- if position > last_position :
90
- kbd .send (Keycode .RIGHT_ARROW )
91
- # if the encoder is turned to the left
92
- if position < last_position :
93
- kbd .send (Keycode .LEFT_ARROW )
94
- # reset encoder position
95
88
if position != last_position :
89
+ # if the encoder is turned to the right
90
+ if position > last_position :
91
+ kbd .send (Keycode .RIGHT_ARROW )
92
+ # if the encoder is turned to the left
93
+ if position < last_position :
94
+ kbd .send (Keycode .LEFT_ARROW )
95
+ # reset encoder position
96
96
last_position = position
97
97
print (f"Position: { position } " )
98
98
for b in range (5 ):
You can’t perform that action at this time.
0 commit comments