mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 15:30:08 +08:00
Merge branch 'master' into dev
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
# ...
|
||||
# <subsystem name="actuators" type="mkk">
|
||||
# <configure name="MKK_I2C_SCL_TIME" value="50"/> <!-- this is optional, 150 is default, use 50 for 8 motors-->
|
||||
# </subsystem>
|
||||
# <define name="I2C_TRANSACTION_QUEUE_LEN" value="10"/> <!-- default is 8, increase to 10 or more for 8 motors-->
|
||||
# </firmware>
|
||||
#
|
||||
#
|
||||
|
||||
@@ -1,66 +1,3 @@
|
||||
#
|
||||
# Aspirin IMU
|
||||
#
|
||||
#
|
||||
# required xml:
|
||||
# <section name="IMU" prefix="IMU_">
|
||||
#
|
||||
# <define name="GYRO_X_NEUTRAL" value="33924"/>
|
||||
# <define name="GYRO_Y_NEUTRAL" value="33417"/>
|
||||
# <define name="GYRO_Z_NEUTRAL" value="32809"/>
|
||||
#
|
||||
# <define name="GYRO_X_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Y_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Z_SENS" value="1.01" integer="16"/>
|
||||
#
|
||||
# <define name="ACCEL_X_NEUTRAL" value="32081"/>
|
||||
# <define name="ACCEL_Y_NEUTRAL" value="33738"/>
|
||||
# <define name="ACCEL_Z_NEUTRAL" value="32441"/>
|
||||
#
|
||||
# <define name="ACCEL_X_SENS" value="2.50411474" integer="16"/>
|
||||
# <define name="ACCEL_Y_SENS" value="2.48126183" integer="16"/>
|
||||
# <define name="ACCEL_Z_SENS" value="2.51396167" integer="16"/>
|
||||
#
|
||||
# <define name="MAG_X_NEUTRAL" value="2358"/>
|
||||
# <define name="MAG_Y_NEUTRAL" value="2362"/>
|
||||
# <define name="MAG_Z_NEUTRAL" value="2119"/>
|
||||
#
|
||||
# <define name="MAG_X_SENS" value="3.4936416" integer="16"/>
|
||||
# <define name="MAG_Y_SENS" value="3.607713" integer="16"/>
|
||||
# <define name="MAG_Z_SENS" value="4.90788848" integer="16"/>
|
||||
#
|
||||
# </section>
|
||||
#
|
||||
#
|
||||
include $(CFG_SHARED)/imu_aspirin_v1.0.makefile
|
||||
|
||||
# imu aspirin
|
||||
|
||||
IMU_ASPIRIN_CFLAGS = -DUSE_IMU
|
||||
IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHANNELS
|
||||
IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \
|
||||
$(SRC_SUBSYSTEMS)/imu/imu_aspirin.c \
|
||||
$(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c
|
||||
|
||||
# Magnetometer
|
||||
IMU_ASPIRIN_SRCS += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c
|
||||
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_I2C2
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
#TODO
|
||||
else ifeq ($(ARCH), stm32)
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
|
||||
endif
|
||||
|
||||
|
||||
# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
|
||||
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
|
||||
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
|
||||
ap.srcs += $(IMU_ASPIRIN_SRCS)
|
||||
|
||||
# sim not done yet
|
||||
#sim.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
|
||||
#sim.srcs += $(IMU_ASPIRIN_SRCS)
|
||||
$(warning The imu_aspirin subsystem has been split up into different versions, please replace <subsystem name="imu" type="aspirin"/> with <subsystem name="imu" type="aspirin_v1.0"/> (or aspirin_v1.5) in your airframe file.)
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Common part for all Aspirin IMUs
|
||||
#
|
||||
#
|
||||
# required xml:
|
||||
# <section name="IMU" prefix="IMU_">
|
||||
#
|
||||
# <define name="GYRO_X_NEUTRAL" value="33924"/>
|
||||
# <define name="GYRO_Y_NEUTRAL" value="33417"/>
|
||||
# <define name="GYRO_Z_NEUTRAL" value="32809"/>
|
||||
#
|
||||
# <define name="GYRO_X_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Y_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Z_SENS" value="1.01" integer="16"/>
|
||||
#
|
||||
# <define name="ACCEL_X_NEUTRAL" value="32081"/>
|
||||
# <define name="ACCEL_Y_NEUTRAL" value="33738"/>
|
||||
# <define name="ACCEL_Z_NEUTRAL" value="32441"/>
|
||||
#
|
||||
# <define name="ACCEL_X_SENS" value="2.50411474" integer="16"/>
|
||||
# <define name="ACCEL_Y_SENS" value="2.48126183" integer="16"/>
|
||||
# <define name="ACCEL_Z_SENS" value="2.51396167" integer="16"/>
|
||||
#
|
||||
# <define name="MAG_X_NEUTRAL" value="2358"/>
|
||||
# <define name="MAG_Y_NEUTRAL" value="2362"/>
|
||||
# <define name="MAG_Z_NEUTRAL" value="2119"/>
|
||||
#
|
||||
# <define name="MAG_X_SENS" value="3.4936416" integer="16"/>
|
||||
# <define name="MAG_Y_SENS" value="3.607713" integer="16"/>
|
||||
# <define name="MAG_Z_SENS" value="4.90788848" integer="16"/>
|
||||
#
|
||||
# </section>
|
||||
#
|
||||
#
|
||||
|
||||
# imu aspirin
|
||||
|
||||
IMU_ASPIRIN_CFLAGS = -DUSE_IMU
|
||||
IMU_ASPIRIN_CFLAGS += -DIMU_TYPE_H=\"imu/imu_aspirin.h\" -DIMU_OVERRIDE_CHANNELS
|
||||
IMU_ASPIRIN_SRCS = $(SRC_SUBSYSTEMS)/imu.c \
|
||||
$(SRC_SUBSYSTEMS)/imu/imu_aspirin.c \
|
||||
$(SRC_ARCH)/subsystems/imu/imu_aspirin_arch.c
|
||||
|
||||
# Magnetometer
|
||||
IMU_ASPIRIN_SRCS += peripherals/hmc5843.c $(SRC_ARCH)/peripherals/hmc5843_arch.c
|
||||
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_I2C2
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
#TODO
|
||||
else ifeq ($(ARCH), stm32)
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI9_5_IRQ # Mag Int on PB5
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2
|
||||
IMU_ASPIRIN_CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Aspirin IMU v1.0
|
||||
#
|
||||
#
|
||||
# required xml:
|
||||
# <section name="IMU" prefix="IMU_">
|
||||
#
|
||||
# <define name="GYRO_X_NEUTRAL" value="33924"/>
|
||||
# <define name="GYRO_Y_NEUTRAL" value="33417"/>
|
||||
# <define name="GYRO_Z_NEUTRAL" value="32809"/>
|
||||
#
|
||||
# <define name="GYRO_X_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Y_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Z_SENS" value="1.01" integer="16"/>
|
||||
#
|
||||
# <define name="ACCEL_X_NEUTRAL" value="32081"/>
|
||||
# <define name="ACCEL_Y_NEUTRAL" value="33738"/>
|
||||
# <define name="ACCEL_Z_NEUTRAL" value="32441"/>
|
||||
#
|
||||
# <define name="ACCEL_X_SENS" value="2.50411474" integer="16"/>
|
||||
# <define name="ACCEL_Y_SENS" value="2.48126183" integer="16"/>
|
||||
# <define name="ACCEL_Z_SENS" value="2.51396167" integer="16"/>
|
||||
#
|
||||
# <define name="MAG_X_NEUTRAL" value="2358"/>
|
||||
# <define name="MAG_Y_NEUTRAL" value="2362"/>
|
||||
# <define name="MAG_Z_NEUTRAL" value="2119"/>
|
||||
#
|
||||
# <define name="MAG_X_SENS" value="3.4936416" integer="16"/>
|
||||
# <define name="MAG_Y_SENS" value="3.607713" integer="16"/>
|
||||
# <define name="MAG_Z_SENS" value="4.90788848" integer="16"/>
|
||||
#
|
||||
# </section>
|
||||
#
|
||||
#
|
||||
|
||||
# imu aspirin
|
||||
|
||||
include $(CFG_SHARED)/imu_aspirin_common.makefile
|
||||
|
||||
IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_0
|
||||
|
||||
# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
|
||||
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
|
||||
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
|
||||
ap.srcs += $(IMU_ASPIRIN_SRCS)
|
||||
@@ -0,0 +1,46 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Aspirin IMU v1.5
|
||||
#
|
||||
#
|
||||
# required xml:
|
||||
# <section name="IMU" prefix="IMU_">
|
||||
#
|
||||
# <define name="GYRO_X_NEUTRAL" value="33924"/>
|
||||
# <define name="GYRO_Y_NEUTRAL" value="33417"/>
|
||||
# <define name="GYRO_Z_NEUTRAL" value="32809"/>
|
||||
#
|
||||
# <define name="GYRO_X_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Y_SENS" value="1.01" integer="16"/>
|
||||
# <define name="GYRO_Z_SENS" value="1.01" integer="16"/>
|
||||
#
|
||||
# <define name="ACCEL_X_NEUTRAL" value="32081"/>
|
||||
# <define name="ACCEL_Y_NEUTRAL" value="33738"/>
|
||||
# <define name="ACCEL_Z_NEUTRAL" value="32441"/>
|
||||
#
|
||||
# <define name="ACCEL_X_SENS" value="2.50411474" integer="16"/>
|
||||
# <define name="ACCEL_Y_SENS" value="2.48126183" integer="16"/>
|
||||
# <define name="ACCEL_Z_SENS" value="2.51396167" integer="16"/>
|
||||
#
|
||||
# <define name="MAG_X_NEUTRAL" value="2358"/>
|
||||
# <define name="MAG_Y_NEUTRAL" value="2362"/>
|
||||
# <define name="MAG_Z_NEUTRAL" value="2119"/>
|
||||
#
|
||||
# <define name="MAG_X_SENS" value="3.4936416" integer="16"/>
|
||||
# <define name="MAG_Y_SENS" value="3.607713" integer="16"/>
|
||||
# <define name="MAG_Z_SENS" value="4.90788848" integer="16"/>
|
||||
#
|
||||
# </section>
|
||||
#
|
||||
#
|
||||
|
||||
# imu aspirin
|
||||
|
||||
include $(CFG_SHARED)/imu_aspirin_common.makefile
|
||||
|
||||
IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_5
|
||||
|
||||
# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
|
||||
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
|
||||
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
|
||||
ap.srcs += $(IMU_ASPIRIN_SRCS)
|
||||
@@ -32,9 +32,27 @@
|
||||
#include "peripherals/hmc5843.h"
|
||||
#include "peripherals/adxl345.h"
|
||||
|
||||
#ifdef IMU_ASPIRIN_VERSION_1_0
|
||||
#define IMU_MAG_X_CHAN 0
|
||||
#define IMU_MAG_Y_CHAN 1
|
||||
#define IMU_MAG_Z_CHAN 2
|
||||
#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
|
||||
#define IMU_MAG_X_SIGN 1
|
||||
#define IMU_MAG_Y_SIGN 1
|
||||
#define IMU_MAG_Z_SIGN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IMU_ASPIRIN_VERSION_1_5
|
||||
#define IMU_MAG_X_CHAN 2
|
||||
#define IMU_MAG_Y_CHAN 0
|
||||
#define IMU_MAG_Z_CHAN 1
|
||||
#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
|
||||
#define IMU_MAG_X_SIGN 1
|
||||
#define IMU_MAG_Y_SIGN -1
|
||||
#define IMU_MAG_Z_SIGN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined IMU_GYRO_P_SIGN & !defined IMU_GYRO_Q_SIGN & !defined IMU_GYRO_R_SIGN
|
||||
#define IMU_GYRO_P_SIGN 1
|
||||
@@ -46,11 +64,6 @@
|
||||
#define IMU_ACCEL_Y_SIGN 1
|
||||
#define IMU_ACCEL_Z_SIGN 1
|
||||
#endif
|
||||
#if !defined IMU_MAG_X_SIGN & !defined IMU_MAG_Y_SIGN & !defined IMU_MAG_Z_SIGN
|
||||
#define IMU_MAG_X_SIGN 1
|
||||
#define IMU_MAG_Y_SIGN 1
|
||||
#define IMU_MAG_Z_SIGN 1
|
||||
#endif
|
||||
|
||||
enum AspirinStatus
|
||||
{ AspirinStatusUninit,
|
||||
|
||||
@@ -213,9 +213,13 @@ struct FGNetMiniFDM {
|
||||
|
||||
// FIXME: Flightgear on OSX is still 32 bit get rid
|
||||
// off these pragmas when it goes to 64 bit.
|
||||
#ifdef __x86_64__ && __APPLE__
|
||||
#ifdef __x86_64__
|
||||
#pragma pack(push)
|
||||
#ifdef __APPLE__
|
||||
#pragma pack(4)
|
||||
#else
|
||||
#pragma pack(8)
|
||||
#endif
|
||||
#endif
|
||||
struct FGNetGUI {
|
||||
uint32_t version; // increment when data values change
|
||||
|
||||
Reference in New Issue
Block a user