mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 15:30:08 +08:00
Paparazzi Center Exception Handling (tnx to: Serge Le Huitouze)
This commit is contained in:
@@ -98,9 +98,11 @@ let write_preferences = fun (gui:Gtk_pc.window) file (ac_combo:Gtk_tools.combo)
|
||||
add_entry xml "last session" session_name in
|
||||
|
||||
(* Save target *)
|
||||
let xml =
|
||||
let xml = (
|
||||
try
|
||||
let name = Gtk_tools.combo_value target_combo in
|
||||
add_entry xml "last target" name in
|
||||
add_entry xml "last target" name
|
||||
with _ -> xml) in
|
||||
|
||||
let xml =
|
||||
try
|
||||
|
||||
@@ -166,6 +166,7 @@ let parse_ac_targets = fun target_combo ac_file ->
|
||||
store#clear ();
|
||||
(** Clear ComboBox
|
||||
**)
|
||||
(try
|
||||
let af_xml = Xml.parse_file (Env.paparazzi_src // "conf" // ac_file) in
|
||||
List.iter (fun tag ->
|
||||
if ExtXml.tag_is tag "firmware" then begin
|
||||
@@ -199,7 +200,7 @@ let parse_ac_targets = fun target_combo ac_file ->
|
||||
(**
|
||||
Gtk_tools.combo (!strings) target_combo
|
||||
**)
|
||||
|
||||
with _ -> ())
|
||||
|
||||
|
||||
(* Link A/C to airframe & flight_plan labels *)
|
||||
@@ -332,10 +333,12 @@ let build_handler = fun ~file gui ac_combo (target_combo:Gtk_tools.combo) (log:s
|
||||
|
||||
(* Build button *)
|
||||
let callback = fun () ->
|
||||
try (
|
||||
let ac_name = Gtk_tools.combo_value ac_combo
|
||||
and target = Gtk_tools.combo_value target_combo in
|
||||
let target = if target="sim" then target else sprintf "%s.compile" target in
|
||||
Utils.command ~file gui log ac_name target in
|
||||
Utils.command ~file gui log ac_name target
|
||||
) with _ -> log "ERROR: Nothing to build!!!\n" in
|
||||
ignore (gui#button_build#connect#clicked ~callback);
|
||||
|
||||
(* Upload button *)
|
||||
|
||||
Reference in New Issue
Block a user