diff --git a/g29py/g29.py b/g29py/g29.py index 3145689..9edf4f6 100644 --- a/g29py/g29.py +++ b/g29py/g29.py @@ -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]: