mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
[ocaml] unbind WORLD_ENV message requests on timeout for sim
This commit is contained in:
+1
-1
Submodule sw/ext/pprzlink updated: 8fdb0c9823...6efd540406
+3
-1
@@ -178,7 +178,9 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
|
||||
"lat", float ((Rad>>Deg)gps_sol.Gps.wgs84.posn_lat);
|
||||
"long", float ((Rad>>Deg)gps_sol.Gps.wgs84.posn_long);
|
||||
"alt", float gps_sol.Gps.alt ] in
|
||||
Ground_Pprz.message_req "sim" "WORLD_ENV" values world_update
|
||||
let (b, flag) = Ground_Pprz.message_req "sim" "WORLD_ENV" values world_update in
|
||||
(* unbind manually after 1s if no message received *)
|
||||
ignore (GMain.Timeout.add 1000 (fun () -> if !flag then Ivy.unbind b; false))
|
||||
with
|
||||
exc -> fprintf stderr "Error in sim: %s\n%!" (Printexc.to_string exc)
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user