]> git.droids-corp.org - aversive.git/blobdiff - projects/microb2010/ballboard/state.c
ballboard: ramp on roller, and maybe fix race on state machine
[aversive.git] / projects / microb2010 / ballboard / state.c
index 57d44ff6a0e924a0099ffb29e9463f0bc1b48c63..08c104d96340244586958f9c73e6b4f6b8e5cd28 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: