Skip to content

Commit

Permalink
AutoCommandsFromRC overwritten in INDI
Browse files Browse the repository at this point in the history
fix?
  • Loading branch information
dewagter committed Nov 6, 2023
1 parent 7320b65 commit 6196ab6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions conf/airframes/tudelft/rot_wing_25kg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@
</commands>


<auto_rc_commands>
<set VALUE="@AUX4" COMMAND="THRUST_X"/>
</auto_rc_commands>
<rc_commands>
<set COMMAND="THRUST_X" VALUE="@AUX4"/>
</rc_commands>


<command_laws>
Expand Down
4 changes: 4 additions & 0 deletions sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ void guidance_v_run(bool in_flight)
case GUIDANCE_V_MODE_RC_DIRECT:
guidance_v.z_sp = stateGetPositionNed_i()->z; // for display only
stabilization_cmd[COMMAND_THRUST] = guidance_v.rc_delta_t;

#ifdef SetCommandsFromRC
SetCommandsFromRC(stabilization_cmd,radio_control.values);
#endif
break;

case GUIDANCE_V_MODE_RC_CLIMB:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
#endif
#endif

#ifdef SetCommandsFromRC
#warning SetCommandsFromRC not used: STAB_INDI overwrites actuators
#ifdef SetAutoCommandsFromRC
#warning SetAutoCommandsFromRC not used: STAB_INDI writes actuators directly
#endif

#if !STABILIZATION_INDI_ALLOCATION_PSEUDO_INVERSE
Expand Down

0 comments on commit 6196ab6

Please sign in to comment.