mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 12:23:23 +08:00
New bungee launch function added
This commit is contained in:
@@ -17,14 +17,14 @@
|
||||
<!ELEMENT exceptions (exception*)>
|
||||
|
||||
<!ELEMENT blocks (block+)>
|
||||
<!ELEMENT block (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|for|return|eight|oval|home)*>
|
||||
<!ELEMENT block (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|bungeetakeoff|for|return|eight|oval|home)*>
|
||||
|
||||
<!ELEMENT include (arg|with)*>
|
||||
<!ELEMENT arg EMPTY>
|
||||
<!ELEMENT with EMPTY>
|
||||
|
||||
<!ELEMENT while (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|for|return|eight|oval)*>
|
||||
<!ELEMENT for (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|for|return|eight|oval)*>
|
||||
<!ELEMENT while (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|bungeetakeoff|for|return|eight|oval)*>
|
||||
<!ELEMENT for (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|bungeetakeoff|for|return|eight|oval)*>
|
||||
<!ELEMENT exception EMPTY>
|
||||
<!ELEMENT heading EMPTY>
|
||||
<!ELEMENT attitude EMPTY>
|
||||
@@ -37,6 +37,7 @@
|
||||
<!ELEMENT eight EMPTY>
|
||||
<!ELEMENT oval EMPTY>
|
||||
<!ELEMENT survey_rectangle EMPTY>
|
||||
<!ELEMENT bungeetakeoff EMPTY>
|
||||
<!ELEMENT deroute EMPTY>
|
||||
<!ELEMENT stay EMPTY>
|
||||
<!ELEMENT follow EMPTY>
|
||||
@@ -174,6 +175,8 @@ orientation CDATA #IMPLIED
|
||||
wp1 CDATA #REQUIRED
|
||||
wp2 CDATA #REQUIRED>
|
||||
|
||||
<!ATTLIST bungeetakeoff
|
||||
BungeeWP CDATA #REQUIRED>
|
||||
|
||||
<!ATTLIST stay
|
||||
wp CDATA #REQUIRED
|
||||
|
||||
@@ -232,7 +232,7 @@ let rec index_stage = fun x ->
|
||||
| "heading" | "attitude" | "go" | "stay" | "xyz" | "set" | "circle" ->
|
||||
incr stage;
|
||||
Xml.Element (Xml.tag x, Xml.attribs x@["no", soi !stage], Xml.children x)
|
||||
| "survey_rectangle" | "eight" | "oval"->
|
||||
| "bungeetakeoff"| "survey_rectangle" | "eight" | "oval"->
|
||||
incr stage; incr stage;
|
||||
Xml.Element (Xml.tag x, Xml.attribs x@["no", soi !stage], Xml.children x)
|
||||
| "exception" ->
|
||||
@@ -440,6 +440,17 @@ let rec print_stage = fun index_of_waypoints x ->
|
||||
stage ();
|
||||
lprintf "NavSurveyRectangle(%s, %s);\n" wp1 wp2;
|
||||
lprintf "break;\n"
|
||||
| "bungeetakeoff" ->
|
||||
let bwp = get_index_waypoint (ExtXml.attrib x "BungeeWP") index_of_waypoints in
|
||||
stage ();
|
||||
lprintf "if (! (InitializeBungeeTakeoff(%s)))\n" bwp;
|
||||
lprintf " NextStageAndBreak();\n";
|
||||
lprintf "break;\n";
|
||||
left ();
|
||||
stage ();
|
||||
lprintf "if (! (BungeeTakeoff()))\n";
|
||||
lprintf " NextStageAndBreak();\n";
|
||||
lprintf "break;\n"
|
||||
| _s -> failwith "Unreachable"
|
||||
end;
|
||||
left ()
|
||||
|
||||
Reference in New Issue
Block a user