From: zer0 Date: Tue, 4 May 2010 17:17:36 +0000 (+0200) Subject: wait that ballboard is ready before eject X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0a6dcb3bfa4b8b424975f91b8bcd57f0832deb9e;p=aversive.git wait that ballboard is ready before eject --- diff --git a/projects/microb2010/mainboard/strat.c b/projects/microb2010/mainboard/strat.c index ced55e3..3ef6675 100644 --- a/projects/microb2010/mainboard/strat.c +++ b/projects/microb2010/mainboard/strat.c @@ -294,7 +294,14 @@ static uint8_t strat_eject(void) DEBUG(E_USER_STRAT, "%s():%d", __FUNCTION__, __LINE__); strat_hardstop(); +#ifdef HOST_VERSION time_wait_ms(2000); +#else + WAIT_COND_OR_TIMEOUT(ballboard.status == I2C_BALLBOARD_STATUS_F_BUSY, + 2000); + WAIT_COND_OR_TIMEOUT(ballboard.status == I2C_BALLBOARD_STATUS_F_READY, + 2000); +#endif /* half turn */ trajectory_a_rel(&mainboard.traj, COLOR_A(180));