From 2f8e0033575e4a4c7404a163a3cfb0ba75a4e7f5 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Mon, 8 Dec 2014 13:01:54 +0100 Subject: [PATCH] [ground_segment] settings: also set current value lable to ? when requesting update --- sw/ground_segment/cockpit/page_settings.ml | 6 ++++-- sw/ground_segment/tmtc/server.ml | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sw/ground_segment/cockpit/page_settings.ml b/sw/ground_segment/cockpit/page_settings.ml index acf799aca3..53fff8b53e 100644 --- a/sw/ground_segment/cockpit/page_settings.ml +++ b/sw/ground_segment/cockpit/page_settings.ml @@ -187,9 +187,11 @@ let one_setting = fun (i:int) (do_change:int -> float -> unit) packing dl_settin let set_default = fun x -> if not !modified then set_default x else () in - (* Update value *) + (* click current_value lable to request an update *) let callback = fun _ -> - do_change i infinity; true in + do_change i infinity; + current_value#set_text "?"; + true in ignore (eb#event#connect#button_press ~callback); (* Auto check button *) diff --git a/sw/ground_segment/tmtc/server.ml b/sw/ground_segment/tmtc/server.ml index c4c661df73..3276cc91e5 100644 --- a/sw/ground_segment/tmtc/server.ml +++ b/sw/ground_segment/tmtc/server.ml @@ -690,7 +690,11 @@ let get_setting = fun logging _sender vs -> let vs = [ "index", List.assoc "index" vs; "ac_id", Pprz.String ac_id ] in Dl_Pprz.message_send dl_id "GET_SETTING" vs; - log logging ac_id "GET_SETTING" vs + log logging ac_id "GET_SETTING" vs; + (* mark the setting as not yet confirmed *) + let ac = Hashtbl.find aircrafts ac_id in + let idx = Pprz.int_of_value (List.assoc "index" vs) in + ac.dl_setting_values.(idx) <- infinity (** Got a JUMP_TO_BLOCK, and send an BLOCK *)