mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-29 02:38:07 +08:00
[ground segment] Added geometry param to messages and settings agents.
This commit is contained in:
@@ -203,9 +203,12 @@
|
|||||||
<program name="Server">
|
<program name="Server">
|
||||||
<arg flag="-n"/>
|
<arg flag="-n"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="Messages"/>
|
<program name="Messages">
|
||||||
|
<arg flag="-g" constant="300x400+0-220"/>
|
||||||
|
</program>
|
||||||
<program name="Settings">
|
<program name="Settings">
|
||||||
<arg flag="-ac" constant="@AIRCRAFT"/>
|
<arg flag="-ac" constant="@AIRCRAFT"/>
|
||||||
|
<arg flag="-g" constant="800x200+0-0"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="Real-time Plotter">
|
<program name="Real-time Plotter">
|
||||||
<arg flag="-g" constant="1000x250-0+0"/>
|
<arg flag="-g" constant="1000x250-0+0"/>
|
||||||
@@ -248,9 +251,12 @@
|
|||||||
<program name="Server">
|
<program name="Server">
|
||||||
<arg flag="-n"/>
|
<arg flag="-n"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="Messages"/>
|
<program name="Messages">
|
||||||
|
<arg flag="-g" constant="300x400+0-220"/>
|
||||||
|
</program>
|
||||||
<program name="Settings">
|
<program name="Settings">
|
||||||
<arg flag="-ac" constant="@AIRCRAFT"/>
|
<arg flag="-ac" constant="@AIRCRAFT"/>
|
||||||
|
<arg flag="-g" constant="800x200+0-0"/>
|
||||||
</program>
|
</program>
|
||||||
<program name="Real-time Plotter">
|
<program name="Real-time Plotter">
|
||||||
<arg flag="-g" constant="1000x250-0+0"/>
|
<arg flag="-g" constant="1000x250-0+0"/>
|
||||||
|
|||||||
@@ -209,11 +209,13 @@ let _ =
|
|||||||
let classes = ref ["telemetry:*"] in
|
let classes = ref ["telemetry:*"] in
|
||||||
let timestamp = ref false in
|
let timestamp = ref false in
|
||||||
let force = ref false in
|
let force = ref false in
|
||||||
|
let geometry = ref "" in
|
||||||
Arg.parse
|
Arg.parse
|
||||||
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
|
[ "-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";
|
"-c", Arg.String (fun x -> classes := x :: !classes), "class name";
|
||||||
"-timestamp", Arg.Set timestamp, "Bind to timestampped messages";
|
"-timestamp", Arg.Set timestamp, "Bind to timestampped messages";
|
||||||
"-force", Arg.Set force, "Force waiting on all messages, not only ALIVE for telemetry class (increase network load)" ]
|
"-force", Arg.Set force, "Force waiting on all messages, not only ALIVE for telemetry class (increase network load)";
|
||||||
|
"-g", Arg.String (fun x -> geometry := x), "<geometry> Set the window geometry ( '500x500+100+100' )"]
|
||||||
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
|
(fun x -> prerr_endline ("WARNING: don't do anything with "^x))
|
||||||
"Usage: ";
|
"Usage: ";
|
||||||
|
|
||||||
@@ -225,6 +227,7 @@ let _ =
|
|||||||
let icon = GdkPixbuf.from_file Env.icon_mes_file in
|
let icon = GdkPixbuf.from_file Env.icon_mes_file in
|
||||||
let window = GWindow.window ~type_hint:`DIALOG ~icon ~title:"Messages" () in
|
let window = GWindow.window ~type_hint:`DIALOG ~icon ~title:"Messages" () in
|
||||||
window#set_default_size ~width:200 ~height:50;
|
window#set_default_size ~width:200 ~height:50;
|
||||||
|
ignore (window#parse_geometry !geometry);
|
||||||
let quit = fun () -> GMain.Main.quit (); exit 0 in
|
let quit = fun () -> GMain.Main.quit (); exit 0 in
|
||||||
ignore (window#connect#destroy ~callback:quit);
|
ignore (window#connect#destroy ~callback:quit);
|
||||||
let vbox = GPack.vbox ~packing:window#add () in
|
let vbox = GPack.vbox ~packing:window#add () in
|
||||||
|
|||||||
@@ -80,11 +80,13 @@ let _ =
|
|||||||
|
|
||||||
let ivy_bus = ref Defivybus.default_ivy_bus in
|
let ivy_bus = ref Defivybus.default_ivy_bus in
|
||||||
let acs = ref [] in
|
let acs = ref [] in
|
||||||
|
let geometry = ref "" in
|
||||||
|
|
||||||
let anon_fun = (fun x -> prerr_endline ("WARNING: don't do anything with "^x)) in
|
let anon_fun = (fun x -> prerr_endline ("WARNING: don't do anything with "^x)) in
|
||||||
let speclist =
|
let speclist =
|
||||||
[ "-b", Arg.String (fun x -> ivy_bus := x), (sprintf "<ivy bus> Default is %s" !ivy_bus);
|
[ "-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"]
|
"-ac", Arg.String (fun x -> acs := x :: !acs), "A/C name";
|
||||||
|
"-g", Arg.String (fun x -> geometry := x), "<geometry> Set the window geometry ( '500x500+100+100' )"]
|
||||||
and usage_msg = "Usage: " in
|
and usage_msg = "Usage: " in
|
||||||
|
|
||||||
Arg.parse speclist anon_fun usage_msg;
|
Arg.parse speclist anon_fun usage_msg;
|
||||||
@@ -102,7 +104,7 @@ let _ =
|
|||||||
(** Open the window container with its notebook*)
|
(** Open the window container with its notebook*)
|
||||||
let icon = GdkPixbuf.from_file Env.icon_file in
|
let icon = GdkPixbuf.from_file Env.icon_file in
|
||||||
let window = GWindow.window ~icon ~width:400 ~height:300 ~allow_shrink:true ~title:"PaSettings" () in
|
let window = GWindow.window ~icon ~width:400 ~height:300 ~allow_shrink:true ~title:"PaSettings" () in
|
||||||
|
ignore (window#parse_geometry !geometry);
|
||||||
let notebook = GPack.notebook ~packing:window#add ~tab_pos:`TOP () in
|
let notebook = GPack.notebook ~packing:window#add ~tab_pos:`TOP () in
|
||||||
|
|
||||||
List.iter (one_ac notebook) !acs;
|
List.iter (one_ac notebook) !acs;
|
||||||
|
|||||||
Reference in New Issue
Block a user