mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
restore something working
This commit is contained in:
+5
-13
@@ -12,22 +12,14 @@ let () =
|
||||
try
|
||||
let rec loop = fun i ->
|
||||
if Sys.argv.(i) = "-a" && (i+1) < n then
|
||||
let ac = Sys.argv.(i+1) in
|
||||
(* Shift other args *)
|
||||
for j = i+2 to n-1 do Sys.argv.(j-2) <- Sys.argv.(j) done;
|
||||
ac
|
||||
let ac = Sys.argv.(i+1) in
|
||||
(* Shift other args *)
|
||||
for j = i+2 to n-1 do Sys.argv.(j-2) <- Sys.argv.(j) done;
|
||||
ac
|
||||
else if i = n then raise Not_found
|
||||
else loop (i+1) in
|
||||
let ac = loop 0 in
|
||||
(*let rec sim_type = fun i ->
|
||||
if Sys.argv.(i) = "-jsbsim" then
|
||||
"jsbsim"
|
||||
else if i = n then "sim"
|
||||
else loop (i+1) in
|
||||
let sim = sim_type 0 in*)
|
||||
let sim = "jsbsim" in
|
||||
let com = paparazzi_home // "var" // ac // sim // "simsitl" in
|
||||
prerr_endline com;
|
||||
let com = paparazzi_home // "var" // ac // "sim/simsitl" in
|
||||
if not (Sys.file_exists com) then begin
|
||||
Printf.fprintf stderr "Error: '%s' is missing. Build target sim for A/C %s ?\n" com ac;
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user