mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 20:36:06 +08:00
misc presentation
This commit is contained in:
+2
-2
@@ -222,9 +222,9 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
|
||||
|
||||
let take_off = fun () -> FlightModel.set_air_speed !state FM.nominal_airspeed in
|
||||
|
||||
let hbox = GPack.hbox ~packing:vbox#pack () in
|
||||
let hbox = GPack.hbox ~spacing:4 ~packing:vbox#pack () in
|
||||
if not !autoboot then begin
|
||||
let s = GButton.button ~label:"Boot" ~packing:(hbox#pack ~padding:5) () in
|
||||
let s = GButton.button ~label:"Boot" ~packing:(hbox#pack) () in
|
||||
ignore (s#connect#clicked ~callback:boot)
|
||||
end else
|
||||
boot ();
|
||||
|
||||
@@ -119,7 +119,7 @@ module Make(A:Data.MISSION) = struct
|
||||
external sim_init : unit -> unit = "sim_init"
|
||||
external update_bat : int -> unit = "update_bat"
|
||||
|
||||
let bat_button = GButton.toggle_button ~label:"Bat" ()
|
||||
let bat_button = GButton.check_button ~label:"Auto" ~active:false ()
|
||||
|
||||
let my_id = ref (-1)
|
||||
let init = fun id vbox ->
|
||||
@@ -127,12 +127,13 @@ module Make(A:Data.MISSION) = struct
|
||||
my_id := id;
|
||||
sim_init ();
|
||||
|
||||
let hbox = GPack.hbox ~packing:vbox#add () in
|
||||
let hbox = GPack.hbox ~spacing:4 ~packing:vbox#add () in
|
||||
let _label = GMisc.label ~text:"Bat (V) " ~packing:hbox#pack () in
|
||||
let _scale = GRange.scale `HORIZONTAL ~adjustment:adj_bat ~packing:hbox#add () in
|
||||
let update = fun () -> update_bat (truncate (adj_bat#value *. 10.)) in
|
||||
hbox#pack bat_button#coerce;
|
||||
let tips = GData.tooltips () in
|
||||
tips#set_tip bat_button#coerce ~text:"Select for auto-decreasing voltage";
|
||||
let _scale = GRange.scale `HORIZONTAL ~adjustment:adj_bat ~packing:hbox#add () in
|
||||
let update = fun () -> update_bat (truncate (adj_bat#value *. 10.)) in
|
||||
ignore (adj_bat#connect#value_changed update);
|
||||
update ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user