wait obstacle -- c nul en fait
[aversive.git] / projects / microb2010 / mainboard / strat_corn.c
index 77c9a51..db672bf 100644 (file)
@@ -162,7 +162,7 @@ static uint8_t clitoid_select_speed(uint8_t num1, uint8_t dir1,
        if (get_cob_count() >= 5)
                return 0; /* fast */
 
-       if (xycoord_to_ijcoord(&x, &y, &i, &j) < 0) {
+       if (xycoord_to_ijcoord_not_corn(&x, &y, &i, &j) < 0) {
                DEBUG(E_USER_STRAT, "%s(): cannot find waypoint at %d,%d",
                      __FUNCTION__, x, y);
                return 1;
@@ -171,10 +171,12 @@ static uint8_t clitoid_select_speed(uint8_t num1, uint8_t dir1,
        if (corn_count_neigh(i, j) == 2)
                return 1;
 
-       /* we are on intersection, let's go slow... but as we enter in
-        * the curve-part of the clitoid, we should not go there */
+
+       /* we are on intersection, keep the same speed... but as we
+        * enter in the curve-part of the clitoid, we should not go
+        * there */
        if (wp_belongs_to_line(i, j, num2, dir2))
-               return 0;
+               return clitoid_slow;
 
        /* we can ge fast if it's a 60deg angle and if we checked the
         * current point */