From: Jérémie D. <Ba...@us...> - 2010-02-20 20:16:16
|
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 77d57ce86871b5b3a5a8f9557efd383a9ebc9def (commit) from 8822a5899f69e2335d351079b1f6f2e997f76260 (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 77d57ce86871b5b3a5a8f9557efd383a9ebc9def Author: Jérémie Dimino <je...@di...> Date: Sat Feb 20 21:15:54 2010 +0100 add the test command ----------------------------------------------------------------------- Changes: diff --git a/PC_Mainboard/clients/script.ml b/PC_Mainboard/clients/script.ml index 17bf780..8b1673d 100644 --- a/PC_Mainboard/clients/script.ml +++ b/PC_Mainboard/clients/script.ml @@ -49,6 +49,8 @@ let commands = [ args = [("card", Arg_keyword ["interface"; "sensor"; "motor"])] }; { name = "reset"; args = [("card", Arg_keyword ["interface"; "sensor"; "motor"])] }; + { name = "test"; + args = [("card", Arg_keyword ["interface"; "sensor"; "motor"])] }; { name = "get-calibration"; args = [] }; { name = "calibration-start"; @@ -196,6 +198,13 @@ let exec krobot line = | "motor" -> `Motor | "sensor" -> `Sensor | _ -> failwith "Script.exec: invalid card") + | "test" -> + Krobot.Card.test krobot + (match arg_string "card" "" with + | "interface" -> `Interface + | "motor" -> `Motor + | "sensor" -> `Sensor + | _ -> failwith "Script.exec: invalid card") | "get-calibration" -> lwt l = Lwt_list.map_p (Krobot.get_calibration krobot) [0; 1; 2; 3; 4; 5; 6; 7] in let buffer = Buffer.create 1024 in diff --git a/PC_Mainboard/driver/commands.ml b/PC_Mainboard/driver/commands.ml index 043c955..e29aaf6 100644 --- a/PC_Mainboard/driver/commands.ml +++ b/PC_Mainboard/driver/commands.ml @@ -32,6 +32,9 @@ let bootloader card = let reset card = Card.send_command card Protocol.cmd_reset "" +let test card = + Card.send_command card Protocol.cmd_test "" + module Compass = struct let get card = diff --git a/PC_Mainboard/driver/commands.mli b/PC_Mainboard/driver/commands.mli index 0c7c5b8..8e2028e 100644 --- a/PC_Mainboard/driver/commands.mli +++ b/PC_Mainboard/driver/commands.mli @@ -15,6 +15,7 @@ val get_firmware_build : Card.t -> string Lwt.t val get_board_info : Card.t -> string Lwt.t val bootloader : Card.t -> unit Lwt.t val reset : Card.t -> unit Lwt.t +val test : Card.t -> unit Lwt.t module Compass : sig val get : Card.t -> int Lwt.t diff --git a/PC_Mainboard/driver/driver.ml b/PC_Mainboard/driver/driver.ml index 71e8a5b..ad4f936 100644 --- a/PC_Mainboard/driver/driver.ml +++ b/PC_Mainboard/driver/driver.ml @@ -536,6 +536,9 @@ struct OL_method Reset : unit = fun dev -> Commands.reset (get_card dev) + OL_method Test : unit = fun dev -> + Commands.test (get_card dev) + OL_signal StateChanged : Types.card_state let make name card path = diff --git a/PC_Mainboard/lib_krobot/krobot.ml b/PC_Mainboard/lib_krobot/krobot.ml index 3a83fc5..ed460f0 100644 --- a/PC_Mainboard/lib_krobot/krobot.ml +++ b/PC_Mainboard/lib_krobot/krobot.ml @@ -229,6 +229,7 @@ struct OP_method GetBoardInfo : string OP_method Bootloader : unit OP_method Reset : unit + OP_method Test : unit let proxy krobot card = OBus_proxy.make krobot.peer @@ -241,4 +242,5 @@ struct let get_board_info krobot card = get_board_info (proxy krobot card) let bootloader krobot card = bootloader (proxy krobot card) let reset krobot card = reset (proxy krobot card) + let test krobot card = test (proxy krobot card) end diff --git a/PC_Mainboard/lib_krobot/krobot.mli b/PC_Mainboard/lib_krobot/krobot.mli index e8bce6d..18aba87 100644 --- a/PC_Mainboard/lib_krobot/krobot.mli +++ b/PC_Mainboard/lib_krobot/krobot.mli @@ -123,4 +123,5 @@ module Card : sig val get_firmware_build : t -> card -> string Lwt.t val get_board_info : t -> card -> string Lwt.t val reset : t -> card -> unit Lwt.t + val test : t -> card -> unit Lwt.t end hooks/post-receive -- krobot |