diff --git a/sw/ground_segment/tmtc/link.ml b/sw/ground_segment/tmtc/link.ml index 2585e7736e..67fff0891e 100644 --- a/sw/ground_segment/tmtc/link.ml +++ b/sw/ground_segment/tmtc/link.ml @@ -74,7 +74,7 @@ let ping_msg_period = ref 5000 (** ms *) (* Time (in ms) after which an aircraft is regarded as dead/off if no messages are received. If an aircraft is not live anymore, no uplink messages are sent. - Set to a negative number to disable this feature. + Set to a zero (or negative number) to disable this feature. *) let dead_aircraft_time_ms = ref 5000 @@ -141,7 +141,7 @@ let status_ping_diff = 500 (* ms *) let live_aircraft = fun ac_id -> try let s = Hashtbl.find statuss ac_id in - s.ms_since_last_msg < !dead_aircraft_time_ms + !dead_aircraft_time_ms <= 0 || s.ms_since_last_msg < !dead_aircraft_time_ms with Not_found -> false @@ -492,7 +492,7 @@ let () = "-id", Arg.Set_int link_id, (sprintf " Sets the link id. If multiple links are used, each must have a unique id. Default is %i" !link_id); "-status_period", Arg.Set_int status_msg_period, (sprintf " Sets the period (in ms) of the LINK_REPORT status message. Default is %i" !status_msg_period); "-ping_period", Arg.Set_int ping_msg_period, (sprintf " Sets the period (in ms) of the PING message sent to aircrafs. Default is %i" !ping_msg_period); - "-ac_timeout", Arg.Set_int dead_aircraft_time_ms, (sprintf "