From: zer0 Date: Mon, 3 May 2010 16:24:23 +0000 (+0200) Subject: fix rasta condition X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4abb0bf96078e303a8f43a0ba020a1801b908ae4;p=aversive.git fix rasta condition --- diff --git a/modules/devices/robot/trajectory_manager/trajectory_manager_core.c b/modules/devices/robot/trajectory_manager/trajectory_manager_core.c index e4f2df6..e3311a9 100644 --- a/modules/devices/robot/trajectory_manager/trajectory_manager_core.c +++ b/modules/devices/robot/trajectory_manager/trajectory_manager_core.c @@ -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 */ diff --git a/projects/microb2010/mainboard/strat.c b/projects/microb2010/mainboard/strat.c index a97ae1a..1585734 100644 --- a/projects/microb2010/mainboard/strat.c +++ b/projects/microb2010/mainboard/strat.c @@ -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(); } diff --git a/projects/microb2010/mainboard/strat.h b/projects/microb2010/mainboard/strat.h index 3ad10bb..94433c1 100644 --- a/projects/microb2010/mainboard/strat.h +++ b/projects/microb2010/mainboard/strat.h @@ -131,8 +131,8 @@ #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.