Skip to content

Commit

Permalink
Only do one INDI init call (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoudSmeur committed May 24, 2023
1 parent e7781e7 commit a1a8704
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion conf/modules/stabilization_rate_indi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<makefile target="ap|nps" firmware="rotorcraft">
<file name="stabilization_rate_indi.c" dir="$(SRC_FIRMWARE)/stabilization"/>
<define name="USE_STABILIZATION_RATE"/>
<define name="USE_STABILIZATION_RATE_INDI" value="true"/>
</makefile>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@

void stabilization_attitude_init(void)
{
// Check if the indi init is already done for rate control
#ifndef USE_STABILIZATION_RATE_INDI
stabilization_indi_init();
#endif
// indi init is already done through module init
}

void stabilization_attitude_enter(void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void send_rate(struct transport_tx *trans, struct link_device *dev)
*/
void stabilization_rate_init(void)
{
stabilization_indi_init();
// indi init is already done through module init

#if PERIODIC_TELEMETRY
register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_RATE_LOOP, send_rate);
Expand Down

0 comments on commit a1a8704

Please sign in to comment.