Skip to content

Commit

Permalink
[server] send ACINFO with ground_dl sender name
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Dec 28, 2015
1 parent dd24916 commit 6824b28
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sw/ground_segment/tmtc/server.ml
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 *)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6824b28

Please sign in to comment.