mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 07:53:43 +08:00
Merge branch 'master' of github.com:paparazzi/paparazzi into analogimu
This commit is contained in:
@@ -91,12 +91,6 @@
|
||||
<define name="GYRO_NB_SAMPLES" value="16" />
|
||||
<define name="ACCEL_NB_SAMPLES" value="32" />
|
||||
|
||||
<define name="GYRO_P" value="ADC_0"/>
|
||||
<define name="GYRO_Q" value="ADC_1"/>
|
||||
<define name="GYRO_R" value="ADC_2"/>
|
||||
<define name="ACCEL_X" value="ADC_5"/>
|
||||
<define name="ACCEL_Y" value="ADC_6"/>
|
||||
<define name="ACCEL_Z" value="ADC_7"/>
|
||||
</section>
|
||||
|
||||
<!-- settings for the Analog IMU -->
|
||||
@@ -216,8 +210,15 @@
|
||||
<!-- Actuators are automatically chosen according to the board-->
|
||||
<subsystem name="control"/>
|
||||
<!-- Sensors -->
|
||||
<subsystem name="attitude" type="analogimu"/>
|
||||
<subsystem name="gps" type="ublox_lea5h"/>
|
||||
<subsystem name="attitude" type="analogimu">
|
||||
<param name="GYRO_P" value="ADC_0"/>
|
||||
<param name="GYRO_Q" value="ADC_1"/>
|
||||
<param name="GYRO_R" value="ADC_2"/>
|
||||
<param name="ACCEL_X" value="ADC_5"/>
|
||||
<param name="ACCEL_Y" value="ADC_6"/>
|
||||
<param name="ACCEL_Z" value="ADC_7"/>
|
||||
</subsystem>
|
||||
<subsystem name="gps" type="ublox_lea5h"/>
|
||||
<subsystem name="navigation"/>
|
||||
</firmware>
|
||||
<!-- Carefull: add the location after!! -->
|
||||
|
||||
@@ -2,28 +2,32 @@
|
||||
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ap.CFLAGS += -DUSE_ANALOG_IMU -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3 -DUSE_ADC_4 -DUSE_ADC_5 -DUSE_ADC_6 -DUSE_ADC_7
|
||||
ap.CFLAGS += -DUSE_ANALOG_IMU
|
||||
ap.CFLAGS += -DADC -DUSE_$(GYRO_P) -DUSE_$(GYRO_Q) -DUSE_ADC_$(GYRO_R)
|
||||
ap.CFLAGS += -DUSE_ADC_3 -DUSE_$(ACCEL_X) -DUSE_$(ACCEL_y) -DUSE_$(ACCEL_Z)
|
||||
|
||||
ap.CFLAGS += -DADC_CHANNEL_GYRO_P=$(GYRO_P) -DADC_CHANNEL_GYRO_Q=$(GYRO_Q) -DADC_CHANNEL_GYRO_R=$(GYRO_R)
|
||||
ap.CFLAGS += -DADC_CHANNEL_ACCEL_X=$(ACCEL_X) -DADC_CHANNEL_ACCEL_Y=$(ACCEL_Y) -DADC_CHANNEL_ACCEL_Z=$(ACCEL_Z)
|
||||
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/dcm/dcm.c
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/ahrs/dcm/analogimu.c
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/imu/imu_analog.c
|
||||
ap.srcs += $(SRC_SUBSYSTEMS)/imu.c
|
||||
|
||||
|
||||
endif
|
||||
|
||||
# since there is currently no SITL sim for the Analog IMU, we use the infrared sim
|
||||
# since there is currently no SITL sim for the Analog IMU, we use the infrared sim
|
||||
|
||||
ifeq ($(TARGET), sim)
|
||||
|
||||
sim.CFLAGS += -DIR_ROLL_NEUTRAL_DEFAULT=0
|
||||
|
||||
sim.CFLAGS += -DIR_PITCH_NEUTRAL_DEFAULT=0
|
||||
|
||||
$(TARGET).CFLAGS += -DUSE_INFRARED
|
||||
$(TARGET).srcs += subsystems/sensors/infrared.c
|
||||
|
||||
sim.srcs += $(SRC_ARCH)/sim_ir.c
|
||||
|
||||
sim.srcs += $(SRC_ARCH)/sim_analogimu.c
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user