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 8585 # while BLE connected
8686 while ble .connected :
8787 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
9588 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
9696 last_position = position
9797 print (f"Position: { position } " )
9898 for b in range (5 ):
You can’t perform that action at this time.
0 commit comments