From: Jérémie D. <Ba...@us...> - 2011-03-28 22:29:08
|
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 00945a9816ab345b174312f946a0eba895b8b045 (commit) via 9f60a4a3de1ef5cdbf1a77cd99e440b99291c17c (commit) via de4cdd7965da9a169fe732a1d015da1fa221f3b2 (commit) from bafd157aea6b314a6972bcf90b29e33e946c2909 (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 00945a9816ab345b174312f946a0eba895b8b045 Author: Jérémie Dimino <je...@di...> Date: Tue Mar 29 00:28:30 2011 +0200 [info] typo in serialization of int32s commit 9f60a4a3de1ef5cdbf1a77cd99e440b99291c17c Author: Jérémie Dimino <je...@di...> Date: Tue Mar 29 00:22:54 2011 +0200 [info] add Krobot_interface_service to krobot.interfaces commit de4cdd7965da9a169fe732a1d015da1fa221f3b2 Author: Jérémie Dimino <je...@di...> Date: Tue Mar 29 00:18:04 2011 +0200 [info] ignore sigpipe in krobot-remote ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index 6c88cb8..c3ac98f 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -52,7 +52,8 @@ Library "krobot-interfaces" Path: src/interfaces Install: true Modules: - Krobot_interface_can + Krobot_interface_can, + Krobot_interface_service # +-------------------------------------------------------------------+ # | The driver | diff --git a/info/control2011/_tags b/info/control2011/_tags index 0388686..16e64a1 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,18 +2,21 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: 689823deb2ad1bb10042fed50bc857aa) +# DO NOT EDIT (digest: 9d263765d4deabae48324e53c88ea807) # Library krobot-interfaces "src/interfaces": include +"src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces <src/interfaces/*.ml{,i}>: pkg_obus # Library krobot "src/lib": include +"src/lib/krobot.cmxs": use_krobot <src/lib/*.ml{,i}>: use_krobot-interfaces <src/lib/*.ml{,i}>: pkg_obus <src/lib/*.ml{,i}>: pkg_lwt.unix <src/lib/*.ml{,i}>: pkg_lwt.syntax # Library krobot-can "src/can": include +"src/can/krobot-can.cmxs": use_krobot-can <src/can/krobot-can.{cma,cmxa}>: use_libkrobot-can <src/can/*.ml{,i}>: use_krobot <src/can/*.ml{,i}>: use_krobot-interfaces diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 8f530a8..506fa79 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 0af52517b361f6b2a84eef09e15eb0d2) *) +(* DO NOT EDIT (digest: f14e1278f404cfe11dc5fe0e2cf46a8e) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -1172,6 +1172,15 @@ module OASISUnixPath = struct with Not_found -> f + let capitalize_file f = + let dir = dirname f in + let base = basename f in + concat dir (String.capitalize base) + + let uncapitalize_file f = + let dir = dirname f in + let base = basename f in + concat dir (String.uncapitalize base) end module OASISSection = struct @@ -1298,8 +1307,8 @@ module OASISLibrary = struct (List.map (OASISUnixPath.concat bs.bs_path) [modul; - String.uncapitalize modul; - String.capitalize modul]) + OASISUnixPath.uncapitalize_file modul; + OASISUnixPath.capitalize_file modul]) in [base_fn^".cmi"] :: hdrs with Not_found -> @@ -1310,8 +1319,8 @@ module OASISLibrary = struct modul cs.cs_name; (List.map (OASISUnixPath.concat bs.bs_path) [modul^".cmi"; - String.uncapitalize modul ^ ".cmi"; - String.capitalize modul ^ ".cmi"]) + OASISUnixPath.uncapitalize_file modul ^ ".cmi"; + OASISUnixPath.capitalize_file modul ^ ".cmi"]) :: hdrs) [] lib.lib_modules @@ -1327,7 +1336,7 @@ module OASISLibrary = struct [cs.cs_name^".cma"] :: acc in let native acc = - [cs.cs_name^".cmxa"] :: [cs.cs_name^(ext_lib ())] :: acc + [cs.cs_name^".cmxs"] :: [cs.cs_name^".cmxa"] :: [cs.cs_name^(ext_lib ())] :: acc in match bs.bs_compiled_object with | Native -> @@ -4302,10 +4311,10 @@ module InternalInstallPlugin = struct (Filename.concat path) [modul^".mli"; modul^".ml"; - String.uncapitalize modul^".mli"; - String.capitalize modul^".mli"; - String.uncapitalize modul^".ml"; - String.capitalize modul^".ml"]) + OASISUnixPath.uncapitalize_file modul^".mli"; + OASISUnixPath.capitalize_file modul^".mli"; + OASISUnixPath.uncapitalize_file modul^".ml"; + OASISUnixPath.capitalize_file modul^".ml"]) :: acc with Not_found -> begin @@ -4742,6 +4751,7 @@ module OCamlbuildPlugin = struct (fun fn -> ends_with ".cma" fn || ends_with ".cmxa" fn || + ends_with ".cmxs" fn || ends_with (ext_lib ()) fn || ends_with (ext_dll ()) fn)) unix_files) @@ -5065,7 +5075,8 @@ let setup_t = bs_nativeopt = [(OASISExpr.EBool true, [])]; }, { - lib_modules = ["Krobot_interface_can"]; + lib_modules = + ["Krobot_interface_can"; "Krobot_interface_service"]; lib_internal_modules = []; lib_findlib_parent = Some "krobot"; lib_findlib_name = Some "interfaces"; diff --git a/info/control2011/src/interfaces/krobot-interfaces.mllib b/info/control2011/src/interfaces/krobot-interfaces.mllib index d9a7ba4..b25ba41 100644 --- a/info/control2011/src/interfaces/krobot-interfaces.mllib +++ b/info/control2011/src/interfaces/krobot-interfaces.mllib @@ -1,4 +1,5 @@ # OASIS_START -# DO NOT EDIT (digest: 4c91fe13e6ec5025ba97566f5b8f3875) +# DO NOT EDIT (digest: ca580479098ade9ac95ba1a5fb876b9b) Krobot_interface_can +Krobot_interface_service # OASIS_STOP diff --git a/info/control2011/src/lib/krobot_can.ml b/info/control2011/src/lib/krobot_can.ml index b533422..8b40c46 100644 --- a/info/control2011/src/lib/krobot_can.ml +++ b/info/control2011/src/lib/krobot_can.ml @@ -136,8 +136,8 @@ let put_uint16 = put_sint16 let put_sint32 str ofs v = str.[ofs + 0] <- Char.unsafe_chr v; str.[ofs + 1] <- Char.unsafe_chr (v lsr 8); - str.[ofs + 1] <- Char.unsafe_chr (v lsr 16); - str.[ofs + 1] <- Char.unsafe_chr (v lsr 24) + str.[ofs + 2] <- Char.unsafe_chr (v lsr 16); + str.[ofs + 3] <- Char.unsafe_chr (v lsr 24) let put_uint32 = put_sint32 diff --git a/info/control2011/src/lib/krobot_message.ml b/info/control2011/src/lib/krobot_message.ml index 38b3d50..ae4fe99 100644 --- a/info/control2011/src/lib/krobot_message.ml +++ b/info/control2011/src/lib/krobot_message.ml @@ -202,7 +202,7 @@ let decode frame = float (get_uint16 frame.data 4) /. 1000., float (get_uint16 frame.data 6) /. 1000.) | 202 -> - Motor_move + Motor_turn (float (get_sint32 frame.data 0) *. pi /. 1800., float (get_uint16 frame.data 4) *. pi /. 1800., float (get_uint16 frame.data 6) *. pi /. 1800.) diff --git a/info/control2011/src/tools/krobot_remote.ml b/info/control2011/src/tools/krobot_remote.ml index 9931ce6..f9ad3a6 100644 --- a/info/control2011/src/tools/krobot_remote.ml +++ b/info/control2011/src/tools/krobot_remote.ml @@ -17,7 +17,7 @@ let rec copy ta tb = let handle_connection server ta = ignore ( lwt () = Lwt_log.info "new connection" in - let process = Lwt_process.open_process ("ssh", [|"ssh"; "krobot"; "krobot-local"|]) in + let process = Lwt_process.open_process ("ssh", [|"ssh"; "krobot"; "/home/krobot/bin/krobot-local"|]) in try_lwt lwt _ = Lwt_io.read_char process#stdout in let tb = @@ -41,6 +41,7 @@ let handle_connection server ta = ) lwt () = + Sys.set_signal Sys.sigpipe Sys.Signal_ignore; lwt server = OBus_server.make_lowlevel ~addresses:[OBus_address.make "unix" [("abstract", "krobot")]] hooks/post-receive -- krobot |