diff --git a/sw/ground_segment/cockpit/live.ml b/sw/ground_segment/cockpit/live.ml index 7ae9bf7d0e..5b6427b40e 100644 --- a/sw/ground_segment/cockpit/live.ml +++ b/sw/ground_segment/cockpit/live.ml @@ -1469,11 +1469,9 @@ let get_intruders = fun (geomap:G.widget) _sender vs -> and lat = (i "lat") /. 1e7 and lon = (i "lon") /. 1e7 in let pos = { posn_lat=(Deg>>Rad)lat; posn_long=(Deg>>Rad)lon } in - if Intruders.intruder_exist id - then - Intruders.update_intruder id pos (f "course") ((i "alt") /. 1000.) (f "speed") (f "climb") time - else - Intruders.new_intruder id name time geomap + if not (Intruders.intruder_exist id) then + Intruders.new_intruder id name time geomap; + Intruders.update_intruder id pos (f "course") ((i "alt") /. 1000.) (f "speed") (f "climb") time let listen_intruders = fun (geomap:G.widget) -> safe_bind "INTRUDER" (get_intruders geomap)