mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-20 11:28:58 +08:00
[autopilot] fix parsing of modules in generated AP files (#3432)
Doxygen / build (push) Waiting to run
Doxygen / build (push) Waiting to run
This commit is contained in:
committed by
GitHub
parent
d97533b353
commit
980e52eecf
@@ -38,7 +38,7 @@ let from_xml = function
|
||||
m @ List.map Module.config_from_xml (Xml.children el)
|
||||
else
|
||||
m
|
||||
) [] children in
|
||||
) [] (List.flatten (List.map Xml.children children)) in
|
||||
{ filename = ""; modules; xml }
|
||||
| _ -> failwith "Autopilot.from_xml: unreachable"
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ let parse_and_gen_modes xml_file ap_name main_freq h_dir sm =
|
||||
fprintf out_h "\n#ifdef AUTOPILOT_CORE_%s_C\n\n" name_up;
|
||||
(* Print includes and private variables *)
|
||||
print_includes (get_includes sm) out_h;
|
||||
if has_modules sm then fprintf out_h "\n#include \"modules.h\"\n";
|
||||
if has_modules sm then fprintf out_h "\n#include \"generated/modules.h\"\n";
|
||||
fprintf out_h "\nuint8_t private_autopilot_mode_%s;\n" name;
|
||||
fprintf out_h "uint8_t last_autopilot_mode_%s;\n\n" name;
|
||||
(* Print functions *)
|
||||
|
||||
Reference in New Issue
Block a user