[conf] use call_once in rotorcraft_basic flight plan

This commit is contained in:
Felix Ruess
2016-12-14 19:24:40 +01:00
parent 737a561321
commit d49670e855
+9 -9
View File
@@ -17,25 +17,25 @@
</waypoints> </waypoints>
<blocks> <blocks>
<block name="Wait GPS"> <block name="Wait GPS">
<call fun="NavKillThrottle()"/> <call_once fun="NavKillThrottle()"/>
<while cond="!GpsFixValid()"/> <while cond="!GpsFixValid()"/>
</block> </block>
<block name="Geo init"> <block name="Geo init">
<while cond="LessThan(NavBlockTime(), 10)"/> <while cond="LessThan(NavBlockTime(), 10)"/>
<call fun="NavSetGroundReferenceHere()"/> <call_once fun="NavSetGroundReferenceHere()"/>
<!--<call fun="NavSetAltitudeReferenceHere()"/>--> <!--<call_once fun="NavSetAltitudeReferenceHere()"/>-->
</block> </block>
<block name="Holding point"> <block name="Holding point">
<call fun="NavKillThrottle()"/> <call_once fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/> <attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
</block> </block>
<block name="Start Engine"> <block name="Start Engine">
<call fun="NavResurrect()"/> <call_once fun="NavResurrect()"/>
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/> <attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
</block> </block>
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png"> <block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
<exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/> <exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/>
<call fun="NavSetWaypointHere(WP_CLIMB)"/> <call_once fun="NavSetWaypointHere(WP_CLIMB)"/>
<stay vmode="climb" climb="nav_climb_vspeed" wp="CLIMB"/> <stay vmode="climb" climb="nav_climb_vspeed" wp="CLIMB"/>
</block> </block>
<block name="Standby" strip_button="Standby" strip_icon="home.png"> <block name="Standby" strip_button="Standby" strip_icon="home.png">
@@ -45,7 +45,7 @@
<stay wp="p1"/> <stay wp="p1"/>
</block> </block>
<block name="go_p2"> <block name="go_p2">
<call fun="nav_set_heading_deg(90)"/> <call_once fun="nav_set_heading_deg(90)"/>
<go wp="p2"/> <go wp="p2"/>
<deroute block="stay_p1"/> <deroute block="stay_p1"/>
</block> </block>
@@ -75,7 +75,7 @@
<circle radius="nav_radius" wp="CAM"/> <circle radius="nav_radius" wp="CAM"/>
</block> </block>
<block name="land here" strip_button="Land Here" strip_icon="land-right.png"> <block name="land here" strip_button="Land Here" strip_icon="land-right.png">
<call fun="NavSetWaypointHere(WP_TD)"/> <call_once fun="NavSetWaypointHere(WP_TD)"/>
</block> </block>
<block name="land"> <block name="land">
<go wp="TD"/> <go wp="TD"/>
@@ -83,7 +83,7 @@
<block name="flare"> <block name="flare">
<exception cond="NavDetectGround()" deroute="Holding point"/> <exception cond="NavDetectGround()" deroute="Holding point"/>
<exception cond="!nav_is_in_flight()" deroute="landed"/> <exception cond="!nav_is_in_flight()" deroute="landed"/>
<call fun="NavStartDetectGround()"/> <call_once fun="NavStartDetectGround()"/>
<stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/> <stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/>
</block> </block>
<block name="landed"> <block name="landed">