From 0a6dcb3bfa4b8b424975f91b8bcd57f0832deb9e Mon Sep 17 00:00:00 2001 From: zer0 Date: Tue, 4 May 2010 19:17:36 +0200 Subject: [PATCH] wait that ballboard is ready before eject --- projects/microb2010/mainboard/strat.c | 7 +++++++ 1 file changed, 7 insertions(+) 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)); -- 2.39.5