mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
Fixing issue that arised after commit 1de769b6f2, compiles fine. Test flight needed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_NO_REF
|
||||
STAB_ATT_CFLAGS = -DSTABILIZATION_ATTITUDE_TYPE_INT
|
||||
STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_INT
|
||||
STAB_ATT_CFLAGS += -DSTABILIZATION_ATTITUDE_TYPE_H=\"stabilization/stabilization_attitude_passthrough.h\"
|
||||
STAB_ATT_SRCS = $(SRC_FIRMWARE)/stabilization/stabilization_attitude_passthrough.c
|
||||
STAB_ATT_SRCS += $(SRC_FIRMWARE)/stabilization/stabilization_attitude_rc_setpoint.c
|
||||
|
||||
+12
-2
@@ -23,8 +23,8 @@
|
||||
* @file stabilization_attitude_passthrough.c
|
||||
* @brief passthrough attitude stabilization
|
||||
*
|
||||
* This is usefull for instance when having an AC that has needs no
|
||||
* stabilization because it is allready been done by other stabilization
|
||||
* This is useful for instance when having an AC that has needs no
|
||||
* stabilization because it is already been done by other stabilization
|
||||
* software onboard or just does not need it at all.
|
||||
*/
|
||||
|
||||
@@ -72,3 +72,13 @@ void stabilization_attitude_run(bool_t in_flight __attribute__ ((unused))) {
|
||||
BoundAbs(stabilization_cmd[COMMAND_YAW], MAX_PPRZ);
|
||||
}
|
||||
|
||||
void stabilization_attitude_set_failsafe_setpoint(void) {
|
||||
stab_att_sp_euler.phi = 0;
|
||||
stab_att_sp_euler.theta = 0;
|
||||
stab_att_sp_euler.psi = stateGetNedToBodyEulers_i()->psi;
|
||||
}
|
||||
|
||||
void stabilization_attitude_set_from_eulers_i(struct Int32Eulers *sp_euler) {
|
||||
memcpy(&stab_att_sp_euler, sp_euler, sizeof(struct Int32Eulers));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,6 @@
|
||||
#define STABILIZATION_ATTITUDE_PASSTHROUGH_H
|
||||
|
||||
#include "math/pprz_algebra_int.h"
|
||||
|
||||
#include "generated/airframe.h"
|
||||
|
||||
|
||||
extern struct Int32Eulers stab_att_sp_euler; ///< with #INT32_ANGLE_FRAC
|
||||
|
||||
#include "firmwares/rotorcraft/stabilization/stabilization_attitude_common_int.h"
|
||||
|
||||
#endif /* STABILIZATION_ATTITUDE_PASSTHROUGH_H */
|
||||
|
||||
Reference in New Issue
Block a user