fixed bug where update_screen was removed from prootstate class
This commit is contained in:
parent
9cc8fbaafc
commit
37dd54aff7
1 changed files with 1 additions and 21 deletions
|
|
@ -82,26 +82,7 @@ class ProotState:
|
|||
|
||||
def set_bean(self, bean_number, bean_state):
|
||||
self.bean_states[bean_number] = bean_state
|
||||
|
||||
class BeanSet:
|
||||
def __init__(self, num_beans):
|
||||
self.num_beans = num_beans
|
||||
self.bean_states = [False] * num_beans # Initialize all beans as closed
|
||||
|
||||
def set_bean_state(self, index, state):
|
||||
if 0 <= index < self.num_beans:
|
||||
self.bean_states[index] = state
|
||||
else:
|
||||
print("Invalid bean index.")
|
||||
|
||||
def get_bean_state(self, index):
|
||||
if 0 <= index < self.num_beans:
|
||||
return self.bean_states[index]
|
||||
else:
|
||||
print("Invalid bean index.")
|
||||
|
||||
|
||||
|
||||
|
||||
def update_screen(self, blinkFrameCanvases, matrix):
|
||||
|
||||
proot_state = ProotState()
|
||||
|
|
@ -111,4 +92,3 @@ class BeanSet:
|
|||
matrix.SwapOnVSync(blinkFrameCanvases[proot_state.next_blink_frame_number()])
|
||||
else:
|
||||
proot_state.set_ProotScreen(matrix)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue