From: Jérémie D. <Ba...@us...> - 2010-02-23 18:07:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via e4578a9f84417da74eafeb2d81d2ab8079cdb6b3 (commit) from f3530f39db8f3f91c4e699cdb2b62dc4deecbd23 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e4578a9f84417da74eafeb2d81d2ab8079cdb6b3 Author: Jérémie Dimino <je...@di...> Date: Tue Feb 23 19:06:01 2010 +0100 [driver] do not reset the state to Static when already in manual mode ----------------------------------------------------------------------- Changes: diff --git a/PC_Mainboard/driver/driver.ml b/PC_Mainboard/driver/driver.ml index 7a678d6..8c5b020 100644 --- a/PC_Mainboard/driver/driver.ml +++ b/PC_Mainboard/driver/driver.ml @@ -373,9 +373,9 @@ struct || ((direction_l = `Backward || direction_r = `Backward) && date < dev.inhibit_backward_until) then fail (Failure "inhibited move") else begin - if velocity_l = 0 && velocity_r = 0 then + if velocity_l = 0 && velocity_r = 0 then begin stop_motors dev `Smooth - else begin + end else begin dev.state <- Manual(Lwt_unix.sleep duration >> stop_motors dev `Smooth, { velocity = velocity_l; acceleration = acceleration_l; direction = direction_l }, { velocity = velocity_r; acceleration = acceleration_r; direction = direction_r }); @@ -400,7 +400,6 @@ struct fail (Failure "currently in trajectory mode") | Manual(stopper, left, right) -> cancel stopper; - dev.state <- Static; _set_velocities dev (left, right) velocities accelerations duration | Static -> let static = { velocity = 0; acceleration = 0; direction = `Forward } in hooks/post-receive -- krobot |