@@ -87,25 +87,12 @@ def loop(self):
8787 """
8888 self .temp_controller .update ()
8989 self .update_state ()
90- print (
91- "Titrator::handleUI() - " ,
92- self .state .name (),
93- "::substate" ,
94- self .state .substate ,
95- "::loop()" ,
96- )
9790 self .handle_ui ()
9891
9992 def set_next_state (self , new_state , update ):
10093 """
10194 The function used to set the next state the state machine will enter
10295 """
103- print (
104- "Titrator::setNextState() from " ,
105- self .next_state .name () if self .next_state else "nullptr" ,
106- " to " ,
107- new_state .name (),
108- )
10996 self .next_state = new_state
11097 if update :
11198 self .update_state ()
@@ -115,7 +102,12 @@ def update_state(self):
115102 The function used to move to the next state
116103 """
117104 if self .next_state :
118- print ("Titrator::updateState() to " , self .next_state .name ())
105+ print (
106+ "Titrator::updateState() from" ,
107+ self .state .name (),
108+ "to" ,
109+ self .next_state .name (),
110+ )
119111 self .state = self .next_state
120112 self .next_state = None
121113 self .state .start ()
@@ -124,9 +116,8 @@ def handle_ui(self):
124116 """
125117 The function used to receive the keypad input and process the appropriate response
126118 """
127- print ("Titrator::handleUI() - " , self .state .name ())
128119 key = self .keypad .get_key ()
129- print ("Titrator::handleUI() - " , self .state .name (), "::handleKey(" , key , ")" )
130120 if key is not None :
121+ print ("Titrator::handle_ui() key pressed:" , key )
131122 self .state .handle_key (key )
132123 self .state .loop ()
0 commit comments