mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-05 18:51:00 +08:00
Only do one INDI init call (#3034)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user