Skip to content

Commit

Permalink
Plus button setter
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery committed Mar 1, 2024
1 parent d8c5e4d commit 17a57c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion g29py/g29.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ def update_state(self, byte_array):
if byte_array[BUTTON_MISC] != self.cache[BUTTON_MISC]:
self.update_misc(byte_array[BUTTON_MISC])
if byte_array[BUTTON_PLUS] != self.cache[BUTTON_PLUS]:
print("byte_array[2] != self.cache[2]", byte_array[2])
if byte_array[BUTTON_PLUS] == BUTTON_PLUS_ON:
self.state["buttons"]["+"] = 1
else:
self.state["buttons"]["+"] = 0
if byte_array[BUTTON_MISC2] != self.cache[BUTTON_MISC2]:
self.update_misc2(byte_array[BUTTON_MISC2])
if byte_array[STEERING_COARSE] != self.cache[STEERING_COARSE] or byte_array[STEERING_FINE] != self.cache[STEERING_FINE]:
Expand Down

0 comments on commit 17a57c2

Please sign in to comment.