Towards A/C following

This commit is contained in:
Pascal Brisset
2005-05-24 22:29:12 +00:00
parent 7dfe598a45
commit b574674482
16 changed files with 152 additions and 16 deletions
+7 -1
View File
@@ -194,7 +194,7 @@ let rec compile_stage = fun block x ->
| "for" ->
List.iter (compile_stage block) (Xml.children x);
incr stage (* To count the loop stage *)
| "return_from_excpt" | "goto" | "deroute" | "exit_block"
| "return_from_excpt" | "goto" | "deroute" | "exit_block" | "follow"
| "heading" | "go" | "stay" | "xyz" | "circle" -> ()
| s -> failwith (sprintf "Unknown stage: %s\n" s)
end
@@ -250,6 +250,12 @@ let rec print_stage = fun index_of_waypoints x ->
ignore (output_vmode x "" "");
left (); lprintf "}\n";
lprintf "return;\n"
| "follow" ->
stage ();
let id = ExtXml.attrib x "ac_id" in
let d = ExtXml.attrib x "distance" in
lprintf "Follow(%s, %s);\n" id d;
lprintf "return;\n"
| "go" ->
stage ();
let wp =