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 74be0d4bea5261dc4196f4d9e3c6a9850ea9aa7e (commit)
from ca16117fcd01ec5ee344604771ff2afa9c90fe65 (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 74be0d4bea5261dc4196f4d9e3c6a9850ea9aa7e
Author: chicco <cha...@cr...>
Date: Thu May 10 00:24:06 2012 +0200
[krobot_dump_ax12] add option to ax12 recording
-----------------------------------------------------------------------
Changes:
diff --git a/info/control2011/src/tools/krobot_ax12_control.ml b/info/control2011/src/tools/krobot_ax12_control.ml
index 853ba44..d50c324 100644
--- a/info/control2011/src/tools/krobot_ax12_control.ml
+++ b/info/control2011/src/tools/krobot_ax12_control.ml
@@ -41,6 +41,7 @@ let run = function
let rec go = function
| [] -> Lwt.return ()
| t::q ->
+ Printf.printf "go\n%!";
lwt () = run t in
go q
@@ -76,5 +77,7 @@ lwt () =
match !run_file with
| None -> go (List.rev !commands)
| Some f ->
+ Printf.printf "run file\n%!";
let actions = to_actions (read (open_in f)) in
+ Printf.printf "truc %i\n%!" (List.length actions);
go actions
diff --git a/info/control2011/src/tools/krobot_dump_ax12.ml b/info/control2011/src/tools/krobot_dump_ax12.ml
index 80044c9..6bb9873 100644
--- a/info/control2011/src/tools/krobot_dump_ax12.ml
+++ b/info/control2011/src/tools/krobot_dump_ax12.ml
@@ -42,9 +42,22 @@ let log () =
| _ -> ())
(Krobot_bus.recv bus))
+let ax12_id = ref []
+let ax12_delay = ref 0.02
+let spec =
+ [ "-id", Arg.Int (fun i -> ax12_id := i::(!ax12_id)), "id of the recorded ax12";
+ "-delay", Arg.Set_float ax12_delay, "delay between to points"; ]
+
+let msg = "record ax12 movement ax12"
+let message _ = Arg.usage spec msg; flush stdout; exit 0
+let () = Arg.parse spec message msg
+
let rec loop_request () =
- lwt () = Lwt_unix.sleep 0.01 in
- lwt () = Lwt_list.iter_s (fun i -> Krobot_bus.send bus (Unix.gettimeofday (), CAN (Info, Krobot_message.encode (Ax12_Request_State i)))) [1;2;3;4] in
+ (*lwt () = Lwt_unix.sleep 0.01 in*)
+ lwt () = Lwt_list.iter_s (fun i ->
+ lwt () = Krobot_bus.send bus (Unix.gettimeofday (), CAN (Info, Krobot_message.encode (Ax12_Request_State i))) in
+ Lwt_unix.sleep !ax12_delay)
+ !ax12_id in
loop_request ()
let t = loop_request ()
hooks/post-receive
--
krobot
|