]> git.droids-corp.org - aversive.git/commitdiff
fix race on state machines
authorzer0 <zer0@carbon.local>
Fri, 30 Apr 2010 19:44:45 +0000 (21:44 +0200)
committerzer0 <zer0@carbon.local>
Fri, 30 Apr 2010 19:44:45 +0000 (21:44 +0200)
projects/microb2010/cobboard/state.c

index 092d0deae348ca3c26ed2b88f767a509e0a7a3d9..86afce990fea8ec6fcea5d759823df107cdcf6b6 100644 (file)
@@ -314,8 +314,8 @@ void state_machine(void)
 
                /* init */
                if (INIT(state_mode)) {
-                       state_mode = I2C_COBBOARD_MODE_HARVEST;
                        state_init();
+                       state_mode = I2C_COBBOARD_MODE_HARVEST;
                }
 
                /* pack/deply spickles, enable/disable roller */