[server] send ACINFO with ground_dl sender name

This commit is contained in:
Felix Ruess
2015-12-28 23:24:30 +01:00
parent dd24916486
commit 6824b28ce2
+3 -5
View File
@@ -41,7 +41,7 @@ module Tm_Pprz = Pprz.Messages (struct let name = "telemetry" end)
module Alerts_Pprz = Pprz.Messages(struct let name = "alert" end)
module Dl_Pprz = Pprz.Messages (struct let name = "datalink" end)
let dl_id = "ground_dl" (* Hack, should be [my_id] *)
let (//) = Filename.concat
let logs_path = Env.paparazzi_home // "var" // "logs"
@@ -373,7 +373,7 @@ let send_aircraft_msg = fun ac ->
"speed", cm_of_m a.gspeed;
"climb", cm_of_m a.climb;
"itow", Pprz.Int64 a.itow] in
Dl_Pprz.message_send my_id "ACINFO" ac_info;
Dl_Pprz.message_send dl_id "ACINFO" ac_info;
end;
if !Kml.enabled then
@@ -649,7 +649,7 @@ let send_intruder_acinfo = fun id intruder ->
"speed", cm_of_m intruder.Intruder.gspeed;
"climb", cm_of_m intruder.Intruder.climb;
"itow", Pprz.Int64 intruder.Intruder.itow] in
Dl_Pprz.message_send my_id "ACINFO" ac_info
Dl_Pprz.message_send dl_id "ACINFO" ac_info
let periodic_handle_intruders = fun () ->
(* remove old intruders after 10s *)
@@ -737,8 +737,6 @@ let cm_of_m = fun f -> Pprz.Int (truncate ((100. *. f) +. 0.5))
(** Convert to mm, with rounding *)
let mm_of_m_32 = fun f -> Pprz.Int32 (Int32.of_int (truncate ((1000. *. f) +. 0.5)))
let dl_id = "ground_dl" (* Hack, should be [my_id] *)
(** Got a ground.MOVE_WAYPOINT and send a datalink.MOVE_WP *)
let move_wp = fun logging _sender vs ->
let f = fun a -> List.assoc a vs