Airframe fixes TUD (#3438)
Some checks failed
Doxygen / build (push) Has been cancelled

* Airframe fixes TUD

* Modes now set in control_loop.xml

* Fix all joysticks
This commit is contained in:
Christophe De Wagter
2025-03-17 14:24:48 +01:00
committed by GitHub
parent 8cdcda4317
commit aa0863fd4f
16 changed files with 44 additions and 69 deletions

View File

@@ -308,13 +308,6 @@
<define name="DESCEND_VSPEED" value="-0.75"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_STARTUP" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_MANUAL" value="AP_MODE_MODULE"/>
<define name="MODE_AUTO1" value="AP_MODE_MODULE"/>
<define name="MODE_AUTO2" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="NO_RC_THRUST_LIMIT" value="TRUE"/>
</section>
<section name="GCS">
<define name="AC_ICON" value="quadrotor_x"/>

View File

@@ -60,24 +60,6 @@
<exception cond="RCLost()" deroute="FAILSAFE"/>
</mode>
<mode name="ATTITUDE_Z_HOLD" shortname="A_ZH">
<select cond="RCMode1()"/>
<on_enter>
<call fun="guidance_h_mode_changed(GUIDANCE_H_MODE_NONE)"/>
<call fun="guidance_v_mode_changed(GUIDANCE_V_MODE_HOVER)"/>
<call fun="stabilization_mode_changed(STABILIZATION_MODE_ATTITUDE, STABILIZATION_ATT_SUBMODE_HEADING)"/>
</on_enter>
<control freq="NAVIGATION_FREQUENCY">
<call fun="nav_periodic_task()"/>
</control>
<control>
<call_block name="run_attitude_control"/>
<call_block name="set_commands"/>
</control>
<exception cond="RCLost()" deroute="FAILSAFE"/>
</mode>
<mode name="MODULE">
<select cond="RCMode1()"/>
<on_enter>

View File

@@ -17,9 +17,9 @@
</input>
<variables>
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="button10"/>
<set var="mode" value="1" on_event="button11"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="button10"/>
<set var="mode" value="127" on_event="button11"/>
</variables>
<messages period="0.1">

View File

@@ -20,9 +20,9 @@
<variables>
<var name="mode" default="0" />
<set var="mode" value="0" on_event="b3" />
<set var="mode" value="1" on_event="b4" />
<set var="mode" value="2" on_event="b5" />
<set var="mode" value="-127" on_event="b3" />
<set var="mode" value="0" on_event="b4" />
<set var="mode" value="127" on_event="b5" />
</variables>
<messages period="0.025">

View File

@@ -52,10 +52,10 @@ The "mode" button swaps the axes on the left stick and the d pad.
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on Y -->
<var name="mode" default="2"/>
<set var="mode" value="0" on_event="b0"/>
<set var="mode" value="1" on_event="b1"/>
<set var="mode" value="2" on_event="b3"/>
<var name="mode" default="127"/>
<set var="mode" value="-127" on_event="b0"/>
<set var="mode" value="0" on_event="b1"/>
<set var="mode" value="127" on_event="b3"/>
</variables>
<messages period="0.017">

View File

@@ -52,10 +52,10 @@ The "mode" button swaps the axes on the left stick and the d pad.
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on Y -->
<var name="mode" default="2"/>
<set var="mode" value="0" on_event="b0"/>
<set var="mode" value="1" on_event="b1"/>
<set var="mode" value="2" on_event="b3"/>
<var name="mode" default="127"/>
<set var="mode" value="-127" on_event="b0"/>
<set var="mode" value="0" on_event="b1"/>
<set var="mode" value="127" on_event="b3"/>
</variables>
<messages period="0.017">

View File

@@ -50,9 +50,9 @@ It has 8 buttons.
<variables>
<!-- manual by default and when pressing b_green, AUTO1 on b_yellow, AUTO2 on b_red -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="b_green"/>
<set var="mode" value="1" on_event="b_yellow"/>
<set var="mode" value="2" on_event="b_red"/>
<set var="mode" value="-127" on_event="b_green"/>
<set var="mode" value="0" on_event="b_yellow"/>
<set var="mode" value="127" on_event="b_red"/>
</variables>
<messages period="0.0333333333">

View File

@@ -44,9 +44,9 @@ so e.g. HatDown(hat)
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on C -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="A"/>
<set var="mode" value="1" on_event="B"/>
<set var="mode" value="2" on_event="C"/>
<set var="mode" value="-127" on_event="A"/>
<set var="mode" value="0" on_event="B"/>
<set var="mode" value="127" on_event="C"/>
</variables>
<messages period="0.1">

View File

@@ -110,7 +110,7 @@ TEST STICK DATA OUTPUT:
<variables>
<!-- TBD: NOT USED AT THIS POINT -->
<var name="mode" default="2"/>
<var name="mode" default="127"/>
</variables>

View File

@@ -57,10 +57,10 @@
<variables>
<!-- manual by default and when pressing X, AUTO1 on Square, AUTO2 on Triangle -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="X"/>
<set var="mode" value="1" on_event="Square"/>
<set var="mode" value="2" on_event="Triangle"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="X"/>
<set var="mode" value="0" on_event="Square"/>
<set var="mode" value="127" on_event="Triangle"/>
</variables>
<messages period="0.05">

View File

@@ -57,10 +57,10 @@
<variables>
<!-- manual by default and when pressing X, AUTO1 on Square, AUTO2 on Triangle -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="X"/>
<set var="mode" value="1" on_event="Square"/>
<set var="mode" value="2" on_event="Triangle"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="X"/>
<set var="mode" value="0" on_event="Square"/>
<set var="mode" value="127" on_event="Triangle"/>
</variables>
<messages period="0.05">

View File

@@ -76,7 +76,7 @@ TEST STICK DATA OUTPUT:
<variables>
<!-- TBD: NOT USED AT THIS POINT -->
<var name="mode" default="2"/>
<var name="mode" default="127"/>
</variables>

View File

@@ -56,10 +56,10 @@ so e.g. HatDown(dpad)
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on Y -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="A"/>
<set var="mode" value="1" on_event="B"/>
<set var="mode" value="2" on_event="Y"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="A"/>
<set var="mode" value="0" on_event="B"/>
<set var="mode" value="127" on_event="Y"/>
</variables>
<messages period="0.05">

View File

@@ -56,10 +56,10 @@ so e.g. HatDown(dpad)
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on Y -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="A"/>
<set var="mode" value="1" on_event="B"/>
<set var="mode" value="2" on_event="Y"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="A"/>
<set var="mode" value="0" on_event="B"/>
<set var="mode" value="127" on_event="Y"/>
</variables>
<messages period="0.05">

View File

@@ -60,10 +60,10 @@ so e.g. HatDown(dpad)
<variables>
<!-- manual by default and when pressing A, AUTO1 on B, AUTO2 on Y -->
<var name="mode" default="0"/>
<set var="mode" value="0" on_event="A"/>
<set var="mode" value="1" on_event="B"/>
<set var="mode" value="2" on_event="Y"/>
<var name="mode" default="-127"/>
<set var="mode" value="-127" on_event="A"/>
<set var="mode" value="0" on_event="B"/>
<set var="mode" value="127" on_event="Y"/>
</variables>
<messages period="0.05">

View File

@@ -70,8 +70,8 @@
<dl_setting var="of_landing_ctrl.igain_horizontal_factor" min="0" step="0.0001" max="1" module="ctrl/optical_flow_landing" shortname="igain_hfact" param="OFL_IGAIN_HORIZONTAL_FACTOR"/>
<dl_setting var="of_landing_ctrl.roll_trim" min="-60.0" step="0.1" max="60.0" module="ctrl/optical_flow_landing" shortname="roll_trim" param="OFL_ROLL_TRIM"/>
<dl_setting var="of_landing_ctrl.pitch_trim" min="-60.0" step="0.1" max="60.0" module="ctrl/optical_flow_landing" shortname="pitch_trim" param="OFL_PITCH_TRIM"/>
<dl_setting var="of_landing_ctrl.omega_LR" min="-60.0" step="1.0" max="60.0" module="ctrl/optical_flow_landing" shortname="omega_LR" param="OFL_OMEGA_LR"/>
<dl_setting var="of_landing_ctrl.omega_FB" min="-60.0" step="1.0" max="60.0" module="ctrl/optical_flow_landing" shortname="omega_FB" param="OFL_OMEGA_FB"/>
<dl_setting var="of_landing_ctrl.omega_LR" min="-160.0" step="1.0" max="160.0" module="ctrl/optical_flow_landing" shortname="omega_LR" param="OFL_OMEGA_LR"/>
<dl_setting var="of_landing_ctrl.omega_FB" min="-160.0" step="1.0" max="160.0" module="ctrl/optical_flow_landing" shortname="omega_FB" param="OFL_OMEGA_FB"/>
<dl_setting var="of_landing_ctrl.active_motion" min="0" step="1" max="2" values="none|flow|angle" module="ctrl/optical_flow_landing" shortname="active_motion" param="OFL_ACTIVE_MOTION"/>
<dl_setting var="of_landing_ctrl.front_div_threshold" min="0.0" step="0.01" max="5.0" module="ctrl/optical_flow_landing" shortname="front_div_threshold" param="OFL_FRONT_DIV_THRESHOLD"/>
</dl_settings>