mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 12:23:23 +08:00
A/Cs are now identified by their id (uint8)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user