From: Jérémie D. <Ba...@us...> - 2011-04-19 17:45:53
|
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 8877ca0b604fe3db017076a12c87b2007e140d73 (commit) from 5c74c5a3162edcc3b84f32a73124c853354287fd (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 8877ca0b604fe3db017076a12c87b2007e140d73 Author: Jérémie Dimino <je...@di...> Date: Tue Apr 19 19:45:25 2011 +0200 [info] add krobot-kill ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index bf73cdb..e826386 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -149,6 +149,13 @@ Executable "krobot-planner" MainIs: krobot_planner.ml BuildDepends: krobot, lwt.syntax +Executable "krobot-kill" + Path: src/tools + Install: true + CompiledObject: best + MainIs: krobot_kill.ml + BuildDepends: krobot, lwt.syntax + # +-------------------------------------------------------------------+ # | Examples | # +-------------------------------------------------------------------+ diff --git a/info/control2011/_tags b/info/control2011/_tags index cadd635..0faf3ef 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: 1679d4e007e0054354522251924e527a) +# DO NOT EDIT (digest: c856ca92c511128600c4a9a2ddb551e7) # Library krobot "src/lib": include "src/lib/krobot.cmxs": use_krobot @@ -69,6 +69,11 @@ <examples/send_can.{native,byte}>: pkg_lwt.unix <examples/send_can.{native,byte}>: pkg_lwt.syntax <examples/send_can.{native,byte}>: pkg_lwt.react +# Executable krobot-kill +<src/tools/krobot_kill.{native,byte}>: use_krobot +<src/tools/krobot_kill.{native,byte}>: pkg_lwt.unix +<src/tools/krobot_kill.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_kill.{native,byte}>: pkg_lwt.react # Executable krobot-plot-battery <src/tools/krobot_plot_battery.{native,byte}>: use_krobot <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.unix diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 078b5ec..41e82e4 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: 30ea6aababbcb01f34ddeb36b478d1f7) *) +(* DO NOT EDIT (digest: d57b3cf1b9ea66ae670ea790a42da492) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5374,6 +5374,33 @@ let setup_t = bs_nativeopt = [(OASISExpr.EBool true, [])]; }, {exec_custom = false; exec_main_is = "send_can.ml"; }); + Executable + ({ + cs_name = "krobot-kill"; + cs_data = PropList.Data.create (); + cs_plugin_data = []; + }, + { + bs_build = [(OASISExpr.EBool true, true)]; + bs_install = [(OASISExpr.EBool true, true)]; + bs_path = "src/tools"; + bs_compiled_object = Best; + bs_build_depends = + [ + InternalLibrary "krobot"; + FindlibPackage ("lwt.syntax", None) + ]; + bs_build_tools = [ExternalTool "ocamlbuild"]; + bs_c_sources = []; + bs_data_files = []; + bs_ccopt = [(OASISExpr.EBool true, [])]; + bs_cclib = [(OASISExpr.EBool true, [])]; + bs_dlllib = [(OASISExpr.EBool true, [])]; + bs_dllpath = [(OASISExpr.EBool true, [])]; + bs_byteopt = [(OASISExpr.EBool true, [])]; + bs_nativeopt = [(OASISExpr.EBool true, [])]; + }, + {exec_custom = false; exec_main_is = "krobot_kill.ml"; }); Flag ({ cs_name = "gtk"; diff --git a/info/control2011/src/driver/krobot_driver.ml b/info/control2011/src/driver/krobot_driver.ml index 47004f1..9e5b578 100644 --- a/info/control2011/src/driver/krobot_driver.ml +++ b/info/control2011/src/driver/krobot_driver.ml @@ -18,12 +18,10 @@ open Krobot_bus +-----------------------------------------------------------------+ *) let fork = ref true -let kill = ref false let once = ref false let options = Arg.align [ "-no-fork", Arg.Clear fork, " Run in foreground"; - "-kill", Arg.Set kill, " Kill any running driver and exit"; "-once", Arg.Set once, " Do not reopen the device on errors"; ] diff --git a/info/control2011/src/tools/krobot_kill.ml b/info/control2011/src/tools/krobot_kill.ml new file mode 100644 index 0000000..77df879 --- /dev/null +++ b/info/control2011/src/tools/krobot_kill.ml @@ -0,0 +1,19 @@ +(* + * krobot_kill.ml + * -------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +open Lwt +open Krobot_bus + +lwt () = + lwt bus = Krobot_bus.get () in + + join + (List.map + (fun prog -> Krobot_bus.send bus (Unix.gettimeofday (), Kill prog)) + (List.tl (Array.to_list Sys.argv))) hooks/post-receive -- krobot |