mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
time scale read on ivy
This commit is contained in:
+13
-1
@@ -115,7 +115,19 @@
|
|||||||
<program name="map 2d ml"/>
|
<program name="map 2d ml"/>
|
||||||
<program name="messages"><arg flag="-c" constant="telemetry_ap:*"/><arg flag="-c" constant="ground:ground"/></program>
|
<program name="messages"><arg flag="-c" constant="telemetry_ap:*"/><arg flag="-c" constant="ground:ground"/></program>
|
||||||
</session>
|
</session>
|
||||||
<session name="display station">
|
<session name="replay">
|
||||||
|
<!-- <variable name="ivy_bus" value="192.168.1:2001"/> -->
|
||||||
|
<variable name="map" value="muret_UTM.xml"/>
|
||||||
|
<program name="receive"/>
|
||||||
|
<program name="http server"/>
|
||||||
|
<program name="sim"><arg flag="-a" constant="Thon1"/></program>
|
||||||
|
<program name="cockpit"><arg flag="-render" constant="1"/></program>
|
||||||
|
<program name="map 2d ml"/>
|
||||||
|
<program name="play"/>
|
||||||
|
<program name="gaia" command="sw/simulator/gaia"/>
|
||||||
|
<program name="messages"><arg flag="-c" constant="telemetry_ap:*"/><arg flag="-c" constant="ground:ground"/></program>
|
||||||
|
</session>
|
||||||
|
<session name="display station">
|
||||||
<variable name="ivy_bus" value="192.168.1:2001"/>
|
<variable name="ivy_bus" value="192.168.1:2001"/>
|
||||||
<program name="cockpit"></program>
|
<program name="cockpit"></program>
|
||||||
<program name="map 2d ml"/>
|
<program name="map 2d ml"/>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ clean:
|
|||||||
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* play
|
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* play
|
||||||
|
|
||||||
play : play.ml
|
play : play.ml
|
||||||
$(OCAMLC) -o $@ unix.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma gtkInit.cmo $^ # to check
|
$(OCAMLC) -o $@ unix.cma glibivy-ocaml.cma -I +lablgtk2 -I ../lib/ocaml lablgtk.cma lib-pprz.cma gtkInit.cmo $^ # to check
|
||||||
cat ../../pprz_src_test.sh > $@
|
cat ../../pprz_src_test.sh > $@
|
||||||
echo 'exec lablgtk2 unix.cma glibivy-ocaml.cma $$PAPARAZZI_SRC/sw/logalizer/$< $$*' >> $@
|
echo 'exec lablgtk2 unix.cma glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/logalizer/$< $$*' >> $@
|
||||||
chmod a+x $@
|
chmod a+x $@
|
||||||
|
|||||||
+18
-6
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
module Ground_Pprz = Pprz.Protocol(struct let name = "ground" end)
|
||||||
|
|
||||||
let log = ref [||]
|
let log = ref [||]
|
||||||
|
|
||||||
let load_log = fun window (adj:GData.adjustment) name ->
|
let load_log = fun window (adj:GData.adjustment) name ->
|
||||||
@@ -80,8 +83,11 @@ let _ =
|
|||||||
~value:0. ~lower:0. ~upper:1000.
|
~value:0. ~lower:0. ~upper:1000.
|
||||||
~step_incr:0.5 ~page_incr:1.0 ~page_size:1.0 () in
|
~step_incr:0.5 ~page_incr:1.0 ~page_size:1.0 () in
|
||||||
|
|
||||||
let speed = GData.adjustment ~value:1. ~lower:0.05 ~upper:10.
|
(*** let speed = GData.adjustment ~value:1. ~lower:0.05 ~upper:10.
|
||||||
~step_incr:0.25 ~page_incr:1.0 () in
|
~step_incr:0.25 ~page_incr:1.0 () in ***)
|
||||||
|
|
||||||
|
let speed = object val mutable v = 1. method value = v method set_value x = v <- x end
|
||||||
|
in
|
||||||
|
|
||||||
let bus = ref "127.255.255.255:3333" in
|
let bus = ref "127.255.255.255:3333" in
|
||||||
Arg.parse
|
Arg.parse
|
||||||
@@ -102,11 +108,11 @@ let _ =
|
|||||||
ignore (file_menu_fact#add_item "Quit" ~key:GdkKeysyms._Q ~callback:quit);
|
ignore (file_menu_fact#add_item "Quit" ~key:GdkKeysyms._Q ~callback:quit);
|
||||||
|
|
||||||
|
|
||||||
let timescale = GRange.scale `HORIZONTAL ~adjustment:adj ~packing:window#vbox#pack () in
|
(***) let timescale = GRange.scale `HORIZONTAL ~adjustment:adj ~packing:window#vbox#pack () in
|
||||||
let speed_button = GEdit.spin_button ~adjustment:speed ~rate:0. ~digits:2 ~width:50 ~packing:window#vbox#add () in
|
let speed_button = GEdit.spin_button (*** ~adjustment:speed ***) ~rate:0. ~digits:2 ~width:50 ~packing:window#vbox#add () in (***)
|
||||||
|
|
||||||
(** #move_slider is not working ??? **) ignore (timescale#event#connect#button_release ~callback:(fun _ -> if !was_running then play adj speed; false));
|
(** #move_slider is not working ??? **) (*** ignore (timescale#event#connect#button_release ~callback:(fun _ -> if !was_running then play adj speed; false));
|
||||||
ignore (timescale#event#connect#button_press ~callback:(fun _ -> was_running := !timer <> None; stop (); false));
|
ignore (timescale#event#connect#button_press ~callback:(fun _ -> was_running := !timer <> None; stop (); false)); ***)
|
||||||
|
|
||||||
window#add_accel_group accel_group;
|
window#add_accel_group accel_group;
|
||||||
window#show ();
|
window#show ();
|
||||||
@@ -114,4 +120,10 @@ let _ =
|
|||||||
Ivy.init "Paparazzi replay" "READY" (fun _ _ -> ());
|
Ivy.init "Paparazzi replay" "READY" (fun _ _ -> ());
|
||||||
Ivy.start !bus;
|
Ivy.start !bus;
|
||||||
|
|
||||||
|
let world_update_time = fun _ vs ->
|
||||||
|
speed#set_value (Pprz.float_assoc "time_scale" vs)
|
||||||
|
in
|
||||||
|
|
||||||
|
ignore (Ground_Pprz.message_bind "WORLD_ENV" world_update_time);
|
||||||
|
|
||||||
GMain.Main.main ()
|
GMain.Main.main ()
|
||||||
|
|||||||
Reference in New Issue
Block a user