diff --git a/sw/ground_segment/tmtc/listen.ml b/sw/ground_segment/tmtc/listen.ml index 218ef9f9fc..9b4b226946 100644 --- a/sw/ground_segment/tmtc/listen.ml +++ b/sw/ground_segment/tmtc/listen.ml @@ -35,7 +35,7 @@ let _ = [ "-b", Arg.String (fun x -> bus := x), "Bus\tDefault is 127.255.255.25:2010"; "-c", Arg.String (fun x -> class_name := x), "Message class name\tDefault is telemetry_fbw"; "-d", Arg.String (fun x -> serial_dev := x), "Serial device\tDefault is /dev/ttyUSB0"] - (fun x -> prerr_endline ("WARNING: don't do anything with ")) + (fun _x -> prerr_endline ("WARNING: don't do anything with ")) "Usage: "; let module Tele_Class = struct let name = !class_name end in diff --git a/sw/ground_segment/tmtc/messages.ml b/sw/ground_segment/tmtc/messages.ml index b954cc5e28..debcce25d8 100644 --- a/sw/ground_segment/tmtc/messages.ml +++ b/sw/ground_segment/tmtc/messages.ml @@ -30,22 +30,10 @@ let update_delay = 0.25 (* Min time in second before two updates *) let led_delay = 500 (* Time in milliseconds while the green led is displayed *) -let space = Str.regexp "[ \t]+" - let (//) = Filename.concat let xml_file = Env.paparazzi_src // "conf" // "messages.xml" -let format = fun field -> - try - match Xml.attrib field "type", Xml.attrib field "format" with - "float", f -> fun x -> Printf.sprintf (Obj.magic f) (float_of_string x) - | _ -> fun x -> x - with _ -> fun x -> x - - - - let _ = let ivy_bus = ref "127.255.255.255:2010" in @@ -74,7 +62,7 @@ let _ = let id = (Xml.attrib m "name") in let h = GPack.hbox () in let v = GPack.vbox ~width:200 () in - let l = GMisc.label ~text:id ~packing:h#add () in + let _l = GMisc.label ~text:id ~packing:h#add () in let eb = GBin.event_box ~packing:h#pack () in let time = GMisc.label ~width:40 ~packing:eb#add () in eb#coerce#misc#modify_bg [`SELECTED, `NAME "green"]; @@ -89,7 +77,7 @@ let _ = let h = GPack.hbox ~packing:v#pack () in let _ = GMisc.label ~text:name ~packing:h#pack () in let l = GMisc.label ~text:"XXXX" ~packing:h#pack () in - let update = fun (a, x) -> + let update = fun (_a, x) -> if notebook#current_page = page_num then let fx = Pprz.string_of_value x in if l#label <> fx then l#set_text fx in @@ -109,7 +97,7 @@ let _ = incr time_since_last; time#set_text (sprintf "%2d" !time_since_last); true in ignore (GMain.Timeout.add 1000 update_time); - let display = fun sender values -> + let display = fun _sender values -> time_since_last := 0; let t = Unix.gettimeofday () in if t > !last_update +. update_delay then begin @@ -144,7 +132,7 @@ let _ = match sender with | Some "*" -> (* Waiting for a new sender in this class *) - let get_one = fun sender vs -> + let get_one = fun sender _vs -> if not (Hashtbl.mem senders sender) then begin Hashtbl.add senders sender (); one_class (ident, xml_class, Some sender) @@ -161,7 +149,7 @@ let _ = let bind = match sender with None -> fun m cb -> P.message_bind m cb | Some sender -> fun m cb -> P.message_bind ~sender m cb in - let bindings = + let _bindings = (** Forall messages in the class *) List.map (fun m -> one_page class_notebook bind m) messages in (*** label#connect#clicked ~callback:(fun () -> prerr_endline "clicked"); ***) diff --git a/sw/ground_segment/tmtc/modem.ml b/sw/ground_segment/tmtc/modem.ml index 88fca571fe..d9649f0bc2 100644 --- a/sw/ground_segment/tmtc/modem.ml +++ b/sw/ground_segment/tmtc/modem.ml @@ -72,8 +72,6 @@ type status = { mutable detected : int } -let max_stalled_time = 2. - let status = { valim = 0.; cd = 0; diff --git a/sw/ground_segment/tmtc/receive.ml b/sw/ground_segment/tmtc/receive.ml index 5937683e3b..a4fa8e9414 100644 --- a/sw/ground_segment/tmtc/receive.ml +++ b/sw/ground_segment/tmtc/receive.ml @@ -162,12 +162,10 @@ type aircraft = { let aircrafts = Hashtbl.create 3 (** Broadcast of the received aircrafts *) -let aircrafts_msg_period = 5000 (* ms *) let aircraft_msg_period = 1000 (* ms *) -let traffic_info_period = 2000 (* ms *) let send_aircrafts_msg = fun _asker _values -> assert(_values = []); - let names = String.concat "," (Hashtbl.fold (fun k v r -> k::r) aircrafts []) ^ "," in + let names = String.concat "," (Hashtbl.fold (fun k _v r -> k::r) aircrafts []) ^ "," in ["ac_list", Pprz.String names] let make_element = fun t a c -> Xml.Element (t,a,c) @@ -333,7 +331,6 @@ let ac_msg = fun log ac_name a m -> fprintf stderr "Unknown message %s from %s: %s\n" x ac_name m | x -> prerr_endline (Printexc.to_string x) -let soi = string_of_int let send_cam_status = fun a -> if a.gps_mode = gps_mode_3D then @@ -413,7 +410,6 @@ let send_horiz_status = fun a -> let send_aircraft_msg = fun ac -> try - let sof = fun f -> sprintf "%.1f" f in let a = Hashtbl.find aircrafts ac in let f = fun x -> Pprz.Float x in let values = ["ac_id", Pprz.String ac; @@ -506,7 +502,7 @@ let register_aircraft = fun name a -> let ident_msg = fun log id name -> if not (Hashtbl.mem aircrafts name) then begin let ac = new_aircraft id in - let b = Ivy.bind (fun _ args -> ac_msg log name ac args.(0)) (sprintf "^%s +(.*)" id) in + let _b = Ivy.bind (fun _ args -> ac_msg log name ac args.(0)) (sprintf "^%s +(.*)" id) in register_aircraft name ac; Ground_Pprz.message_send my_id "NEW_AIRCRAFT" ["ac_id", Pprz.String id] end diff --git a/sw/ground_segment/tmtc/wavecard_connect.ml b/sw/ground_segment/tmtc/wavecard_connect.ml index 303f5b817f..38c82faef1 100644 --- a/sw/ground_segment/tmtc/wavecard_connect.ml +++ b/sw/ground_segment/tmtc/wavecard_connect.ml @@ -56,7 +56,7 @@ let _ = "-d", Arg.Set_string port, (sprintf "Port (%s)" !port)] in Arg.parse options - (fun x -> ()) + (fun _x -> ()) "Usage: "; Ivy.init "Wavecard connect" "READY" (fun _ _ -> ());