bug fix, correctly set the state in the bean state
This commit is contained in:
parent
0a3244e13f
commit
18cf352d1a
2 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ class ProotState:
|
|||
cls._instance.frame_canvas_prootScreen_3 = False
|
||||
cls._instance.matrix = False
|
||||
cls._instance.bean_states = [False] * 4
|
||||
cls._instance.desired_face = 0 # 0=default, 1=blink, 2=owo, 3=angry
|
||||
return cls._instance
|
||||
|
||||
def set_matrix(self, matrix):
|
||||
|
|
|
@ -163,7 +163,7 @@ def on_message(client, userdata, message):
|
|||
print("pin number: " + bean_number + " pin state: " + bean_state)
|
||||
proot_state = ProotState()
|
||||
proot_state.blink()
|
||||
proot_state.set_bean(bean_number, bean_state)
|
||||
proot_state.set_bean(int(bean_number), bean_state)
|
||||
|
||||
# MQTT broker configuration
|
||||
broker_address = "10.1.13.173" # Replace with your MQTT broker's address
|
||||
|
|
Loading…
Add table
Reference in a new issue