A/Cs are now identified by their id (uint8)

This commit is contained in:
Pascal Brisset
2005-05-29 15:50:23 +00:00
parent a1ed0cc58d
commit 7465ba10f7
7 changed files with 15 additions and 43 deletions
+1 -1
View File
@@ -30,6 +30,6 @@ let _ =
mkdir (aircraft_dir // "autopilot");
mkdir (aircraft_dir // "sim");
let c = sprintf "make -f Makefile.ac AIRCRAFT=%s AIRFRAME=%s RADIO=%s FLIGHT_PLAN=%s" aircraft (value "airframe") (value "radio") (value "flight_plan") in
let c = sprintf "make -f Makefile.ac AIRCRAFT=%s AC_ID=%s AIRFRAME=%s RADIO=%s FLIGHT_PLAN=%s" aircraft (value "ac_id") (value "airframe") (value "radio") (value "flight_plan") in
prerr_endline c;
exit (Sys.command c)
+6 -4
View File
@@ -138,14 +138,16 @@ let parse_section = fun s ->
let h_name = "AIRFRAME_H"
let _ =
if Array.length Sys.argv <> 3 then
failwith (Printf.sprintf "Usage: %s A/C_ident xml_file" Sys.argv.(0));
let xml_file = Sys.argv.(2)
and ac_name = Sys.argv.(1) in
if Array.length Sys.argv <> 4 then
failwith (Printf.sprintf "Usage: %s A/C_ident A/C_name xml_file" Sys.argv.(0));
let xml_file = Sys.argv.(3)
and ac_id = Sys.argv.(1)
and ac_name = Sys.argv.(2) in
try
let xml = start_and_begin xml_file h_name in
Xml2h.warning ("AIRFRAME MODEL: "^ ac_name);
define_string "AIRFRAME_NAME" ac_name;
define "AC_ID" ac_id;
nl ();
let v = ExtXml.attrib xml "ctl_board" in
define ("CTL_BRD_"^v) "1";