From: Jérémie D. <Ba...@us...> - 2010-02-23 17:32:20
|
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 b8f7544dccaa2e3b7fae129e3aab7753be831561 (commit) via 04715e243dcdaeee3de34246586171c3b4c9883a (commit) from 819b0a90fd152d2390eea791f5a3ab115b2629a3 (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 b8f7544dccaa2e3b7fae129e3aab7753be831561 Author: Olivier BICHLER <oli...@en...> Date: Tue Feb 23 18:28:38 2010 +0100 [driver] fix directions for the right motor commit 04715e243dcdaeee3de34246586171c3b4c9883a Author: Olivier BICHLER <oli...@en...> Date: Tue Feb 23 18:20:48 2010 +0100 use Char.unsafe_chr in RW ----------------------------------------------------------------------- Changes: diff --git a/PC_Mainboard/driver/RW.ml b/PC_Mainboard/driver/RW.ml index 4406039..c43640f 100644 --- a/PC_Mainboard/driver/RW.ml +++ b/PC_Mainboard/driver/RW.ml @@ -21,11 +21,11 @@ let reader buffer = { buffer = buffer; offset = 0 } let get_uint8 pointer = let offset = pointer.offset in pointer.offset <- offset + 1; - int_of_char pointer.buffer.[offset] + Char.code pointer.buffer.[offset] let put_uint8 pointer value = let offset = pointer.offset in pointer.offset <- offset + 1; - pointer.buffer.[offset] <- char_of_int value + pointer.buffer.[offset] <- Char.unsafe_chr value let get_sint8 = get_uint8 let put_sint8 = put_uint8 diff --git a/PC_Mainboard/driver/driver.ml b/PC_Mainboard/driver/driver.ml index f213256..7a678d6 100644 --- a/PC_Mainboard/driver/driver.ml +++ b/PC_Mainboard/driver/driver.ml @@ -367,7 +367,7 @@ struct let _set_velocities dev (settings_l, settings_r) (velocity_l, velocity_r) (acceleration_l, acceleration_r) duration = let direction_l, velocity_l = if velocity_l < 0 then (`Backward, -velocity_l) else (`Forward, velocity_l) in - let direction_r, velocity_r = if velocity_r < 0 then (`Backward, -velocity_r) else (`Forward, velocity_r) in + let direction_r, velocity_r = if velocity_r < 0 then (`Forward, -velocity_r) else (`Backward, velocity_r) in let date = Unix.gettimeofday () in if ((direction_l = `Forward || direction_r = `Backward) && date < dev.inhibit_forward_until) || ((direction_l = `Backward || direction_r = `Backward) && date < dev.inhibit_backward_until) then hooks/post-receive -- krobot |