]> git.droids-corp.org - aversive.git/commitdiff
fix rasta condition
authorzer0 <zer0@carbon.local>
Mon, 3 May 2010 16:24:23 +0000 (18:24 +0200)
committerzer0 <zer0@carbon.local>
Mon, 3 May 2010 16:24:23 +0000 (18:24 +0200)
modules/devices/robot/trajectory_manager/trajectory_manager_core.c
projects/microb2010/mainboard/strat.c
projects/microb2010/mainboard/strat.h

index e4f2df6ac7179e778378edd42bc3ff10dafe96bf..e3311a9007b789cdf90c5b25f53b3b4486926c86 100644 (file)
@@ -318,8 +318,12 @@ uint8_t trajectory_distance_finished(struct trajectory *traj)
  * distance. */
 uint8_t trajectory_finished(struct trajectory *traj)
 {
-       return trajectory_angle_finished(traj) &&
+       uint8_t flags, ret;
+       IRQ_LOCK(flags);
+       ret = trajectory_angle_finished(traj) &&
                trajectory_distance_finished(traj);
+       IRQ_UNLOCK(flags);
+       return ret;
 }
 
 /** return true if traj is nearly finished */
index a97ae1aaf9597e7dfc8a2d49ccd17dc8ed9ec256..1585734c9f9439b5cd0a79deeb9b30737b5ce8f7 100644 (file)
@@ -320,13 +320,6 @@ static uint8_t strat_beginning(void)
        uint8_t err;
 
        strat_set_acc(ACC_DIST, ACC_ANGLE);
-#ifdef HOST_VERSION
-       strat_set_speed(600, SPEED_ANGLE_FAST);
-#else
-       /* 250 */
-       strat_set_speed(250, SPEED_ANGLE_FAST);
-#endif
-
        strat_set_speed(600, 60); /* OK */
        //strat_set_speed(250, 28); /* OK */
 
@@ -364,7 +357,7 @@ static uint8_t strat_beginning(void)
        strat_eject();
 
        while (1) {
-               strat_set_speed(250, SPEED_ANGLE_FAST);
+               strat_set_speed(250, SPEED_ANGLE_SLOW);
                strat_harvest_circuit();
                strat_eject();
        }
index 3ad10bb5af16b930dc99a1992c019ded00342a0d..94433c1ee29cbc0f7981ec8a68472ec0617f225f 100644 (file)
 #define TRAJ_FLAGS_SMALL_DIST (END_TRAJ|END_BLOCKING|END_INTR)
 
 /* default acc */
-#define ACC_DIST  15.
-#define ACC_ANGLE 15.
+#define ACC_DIST  16.
+#define ACC_ANGLE 16.
 
 /* default speeds */
 #define SPEED_DIST_FAST 2500.