ballboard: ramp on roller, and maybe fix race on state machine
[aversive.git] / projects / microb2010 / ballboard / state.c
index 57d44ff..08c104d 100644 (file)
@@ -144,8 +144,15 @@ static void state_do_eject(void)
 /* main state machine */
 void state_machine(void)
 {
+       uint8_t mode = 0;
+
        while (state_want_exit() == 0) {
 
+               if (state_mode != mode) {
+                       mode = state_mode;
+                       STMCH_DEBUG("%s(): mode=%x ", __FUNCTION__, mode);
+               }
+
                switch (state_mode) {
 
                case INIT: