mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[ground_segment] settings: also set current value lable to ? when requesting update
This commit is contained in:
@@ -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 *)
|
||||
|
||||
@@ -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 *)
|
||||
|
||||
Reference in New Issue
Block a user