pass all modules to settings stuff

not sure this is all right
This commit is contained in:
Gautier Hattenberger
2016-04-28 01:18:03 +02:00
parent 056146e5db
commit f39d8b3007
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -323,9 +323,9 @@ let is_element_unselected = fun ?(verbose=false) target modules name ->
| "settings" ->
let target_list = targets_of_field xml "" in
let unselected = not (test_targets target target_list) in
if unselected && verbose then
if unselected && not (target_list = Var ("")) && verbose then
begin Printf.printf "Info: settings '%s' unloaded for target '%s'\n" name target; flush stdout end;
unselected
unselected && not (target_list = Var (""))
| "module" ->
let unselected = List.for_all (fun m -> m.file <> name) modules in
if unselected && verbose then
+1 -1
View File
@@ -346,7 +346,7 @@ let () =
mkdir (aircraft_conf_dir // "telemetry");
let target = try Sys.getenv "TARGET" with _ -> "" in
let modules = Gen_common.get_modules_of_config ~target (ExtXml.parse_file abs_airframe_file) (ExtXml.parse_file abs_flight_plan_file) in
let modules = Gen_common.get_modules_of_config (ExtXml.parse_file abs_airframe_file) (ExtXml.parse_file abs_flight_plan_file) in
(* normal settings *)
let settings = try Env.filter_settings (value "settings") with _ -> "" in
(* remove settings if not supported for the current target *)