updated default ivy bus mechanism for consistency

This commit is contained in:
lamestllama
2011-01-26 04:37:22 +10:30
parent 13746c0c4a
commit d445143f9f
19 changed files with 26 additions and 24 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ let draw = fun (da_object:Gtk_tools.pixmap_in_drawin_area) desired_course course
let _ =
let ivy_bus = Defivybus.default_ivy_bus in
Arg.parse
[ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010"]
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus)]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
+2 -2
View File
@@ -320,7 +320,7 @@ let keys_help = fun () ->
(***************** MAIN ******************************************************)
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
and geo_ref = ref ""
and map_files = ref []
and center = ref ""
@@ -340,7 +340,7 @@ and srtm = ref false
let options =
[
"-auto_ortho", Arg.Set auto_ortho, "IGN tiles path";
"-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.25:2010";
"-b", Arg.String (fun x -> ivy_bus := x),(sprintf "<ivy bus> Default is %s" !ivy_bus);
"-center", Arg.Set_string center, "Initial map center (e.g. 'WGS84 43.605 1.443')";
"-center_ac", Arg.Set auto_center_new_ac, "Centers the map on any new A/C";
"-edit", Arg.Unit (fun () -> edit := true; layout_file := "editor.xml"), "Flight plan editor";
+1 -1
View File
@@ -321,7 +321,7 @@ let ivy_bus = Defivybus.default_ivy_bus in
let anon_fun = (fun x -> xml_descr := x) in
let speclist =
[ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
[ "-b", Arg.String (fun x -> ivy_bus := x),(sprintf "<ivy bus> Default is %s" !ivy_bus);
"-ac", Arg.Set_string ac_name, "<A/C name>";
"-d", Arg.Set_string device_name, "<device name>";
"-v", Arg.Set verbose, "Verbose mode (useful to identify the channels of an input device)";
+1 -1
View File
@@ -1,7 +1,7 @@
open Printf
let () =
let ivy_bus = Defivybus.default_ivy_bus in
let ivy_bus = ref Defivybus.default_ivy_bus in
let port = ref 4242
and ivy_from = ref "DL"
+1 -1
View File
@@ -89,7 +89,7 @@ let fp_msg = fun _sender vs ->
let _ =
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
and port = ref "/dev/dsp" in
let options = [
"-b", Arg.Set_string ivy_bus, (sprintf "<ivy bus> Default is %s" !ivy_bus);
+1 -1
View File
@@ -33,7 +33,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
open Printf
let () =
let ivy_bus = Defivybus.default_ivy_bus in
let ivy_bus = ref Defivybus.default_ivy_bus in
let host = ref "85.214.48.162"
and port = ref 4242
and datalink_port = ref 4243
+1 -1
View File
@@ -5,7 +5,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
open Printf
let () =
let ivy_bus = Defivybus.default_ivy_bus in
let ivy_bus = ref Defivybus.default_ivy_bus in
let host = ref "10.31.1.98"
and port = ref 4242
and id = ref "6" in
+1 -1
View File
@@ -6,7 +6,7 @@ module PprzTransport = Serial.Transport(Pprz.Transport)
let () =
let host = ref "10.31.1.98"
and ivy_bus = Defivybus.default_ivy_bus in
and ivy_bus = ref Defivybus.default_ivy_bus in
let port = ref 4243 in
let options = [
+2 -2
View File
@@ -187,10 +187,10 @@ let rec one_class = fun (notebook:GPack.notebook) (ident, xml_class, sender) ->
(*********************** Main ************************************************)
let _ =
let ivy_bus = Defivybus.default_ivy_bus in
let ivy_bus = ref Defivybus.default_ivy_bus in
let classes = ref ["telemetry:*"] in
Arg.parse
[ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-c", Arg.String (fun x -> classes := x :: !classes), "class name"]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
+1 -1
View File
@@ -666,7 +666,7 @@ let ground_to_uplink = fun logging ->
(* main loop *)
let () =
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
and logging = ref true
and http = ref false in
+3 -2
View File
@@ -23,6 +23,7 @@
* Boston, MA 02111-1307, USA.
*
*)
open Printf
module Ground_Pprz = Pprz.Messages(struct let name = "ground" end)
module Tele_Pprz = Pprz.Messages(struct let name = "telemetry" end)
@@ -79,10 +80,10 @@ let one_ac = fun (notebook:GPack.notebook) ac_name ->
let _ =
let ivy_bus = Defivybus.default_ivy_bus in
let ivy_bus = ref Defivybus.default_ivy_bus in
let acs = ref [] in
Arg.parse
[ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.255:2010";
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-ac", Arg.String (fun x -> acs := x :: !acs), "A/C name"]
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
"Usage: ";
+1 -1
View File
@@ -515,7 +515,7 @@ let _ =
map_file = ref "" and
mission_file = ref "" in
let options =
[ "-b", Arg.String (fun x -> ivy_bus := x), "Bus\tDefault is 127.255.255.25:2010";
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-m", Arg.String (fun x -> map_file := x), "Map description file";
"-f", Arg.String (fun x -> mission_file := x), "Mission description file"] in
Arg.parse (options)
+2 -2
View File
@@ -18,8 +18,8 @@ let contains s substring =
with Not_found -> false
let default_ivy_bus =
try ref (Sys.getenv "IVY_BUS" )
with Not_found -> ref
try (Sys.getenv "IVY_BUS" )
with Not_found ->
(if contains (read_process_output "uname") "Darwin" then
"224.255.255.255:2010"
else
+1
View File
@@ -0,0 +1 @@
val default_ivy_bus : string
+2 -2
View File
@@ -119,7 +119,7 @@ let load_log = fun xml_file ->
let timer = ref None
let was_running = ref false
let bus = Defivybus.default_ivy_bus
let bus = ref Defivybus.default_ivy_bus
let port = ref "/dev/ttyUSB0"
let baudrate = ref "9600"
let file_to_load = ref ""
@@ -174,7 +174,7 @@ let play = fun ?(no_gui=false) serial_port adj speed ->
let init = fun () ->
Arg.parse
[ "-b", Arg.String (fun x -> bus := x), "Bus\tDefault is 127.255.255.25:2010";
[ "-b", Arg.String (fun x -> bus := x), (sprintf "<ivy bus> Default is %s" !bus);
"-d", Arg.Set_string port, (sprintf "<port> Default is %s" !port);
"-o", Arg.Set output_on_serial, "Output binary messages on serial port";
"-s", Arg.Set_string baudrate, (sprintf "<baudrate> Default is %s" !baudrate)]
+2 -2
View File
@@ -522,7 +522,7 @@ let rec plot_window = fun window ->
let _ =
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
and init = ref [default_window] in
let add_init = fun s ->
@@ -541,7 +541,7 @@ let _ =
| x::xs -> init := {x with geometry = s} :: xs in
Arg.parse
[ "-b", Arg.String (fun x -> ivy_bus := x), "<bus> Bus\tDefault is 127.255.255.255:2010";
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-c", Arg.String (fun x -> add_init x), "<curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)";
(* no code yet *)
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -32,7 +32,7 @@ let sending_period = 5000 (* ms *)
module Ground_Pprz = Pprz.Messages(struct let name = "ground" end)
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
let parse_args = fun () ->
let options =
+2 -2
View File
@@ -77,7 +77,7 @@ external fg_msg : string -> float -> float -> float -> float -> float -> float -
let ac_name = ref "A/C not set"
let ivy_bus = Defivybus.default_ivy_bus
let ivy_bus = ref Defivybus.default_ivy_bus
let fg_client = ref ""
@@ -86,7 +86,7 @@ let autolaunch = ref false
let noground = ref false
let common_options = [
"-b", Arg.Set_string ivy_bus, "Bus\tDefault is 127.255.255.25:2010";
"-b", Arg.Set_string ivy_bus, (sprintf "<ivy bus> Default is %s" !ivy_bus);
"-boot", Arg.Set autoboot, "Boot the A/C on start";
"-launch", Arg.Set autolaunch, "Launch the A/C on start";
"-noground", Arg.Set noground, "Disable ground detection";