use imu analog_gyro subsystem in microjet example and print errors if old gyro subsystems are used

This commit is contained in:
Felix Ruess
2011-10-31 18:46:54 +01:00
parent 64c5aa06a3
commit 620e3b1e24
3 changed files with 25 additions and 33 deletions
+12 -4
View File
@@ -67,13 +67,19 @@
<define name="CORRECTION_RIGHT" value="1."/>
</section>
<section name="GYRO" prefix="GYRO_">
<!--section name="GYRO" prefix="GYRO_">
<define name="ADC_ROLL_NEUTRAL" value="500"/>
<define name="DYNAMIC_RANGE" value="300" unit="deg/s"/>
<define name="ADXRS300_RESISTOR_BRIDGE" value="(3.3/(3.3+1.8))"/>
<define name="ADXRS300_SENSITIVITY" value="5" unit="mV/(deg/s)"/>
<define name="ROLL_SCALE" value="3.3*1000./1024./(GYRO_ADXRS300_SENSITIVITY*GYRO_ADXRS300_RESISTOR_BRIDGE)" unit="deg/s/adc_unit"/>
<define name="ROLL_DIRECTION" value="1."/>
</section-->
<section name="IMU" prefix="IMU_">
<define name="GYRO_P_SIGN" value="1"/>
<define name="GYRO_P_NEUTRAL" value="32362"/>
<define name="GYRO_P_SENS" value="1.1032765" integer="16"/>
</section>
<section name="BAT">
@@ -186,9 +192,11 @@
<subsystem name="control"/>
<!-- Sensors -->
<subsystem name="gyro" type="roll"/>
<subsystem name="ahrs" type="infrared"/>
<subsystem name="gps" type="ublox_utm"/>
<subsystem name="imu" type="analog_gyro">
<configure name="GYRO_P" value="ADC_3"/>
</subsystem>
<subsystem name="ahrs" type="infrared"/>
<subsystem name="gps" type="ublox_utm"/>
<subsystem name="navigation"/>
</firmware>
@@ -1,14 +1,8 @@
# Hey Emacs, this is a -*- makefile -*-
# additional pitch stabilization with gyro
#
# this assumes you are already using a roll gyro
#
# default values for tiny and twog are:
# ADC_GYRO_PITCH = ADC_4
#
# to change just redefine these before including this file
#
ap.CFLAGS += -DADC_CHANNEL_GYRO_PITCH=$(ADC_GYRO_PITCH) -DUSE_$(ADC_GYRO_PITCH)
$(info Error: Please replace <subsystem name="gyro" type="pitch"/> with)
$(info <subsystem name="imu" type="analog_gyro">)
$(info <configure name="GYRO_P" value="ADC_3"/>)
$(info <configure name="GYRO_Q" value="ADC_4"/>)
$(info </subsystem>)
$(info in your airframe file.)
$(error The gyro_pitch subsystem has been removed)
@@ -1,17 +1,7 @@
# Hey Emacs, this is a -*- makefile -*-
$(info Error: Please replace <subsystem name="gyro" type="roll"/> with)
$(info <subsystem name="imu" type="analog_gyro">)
$(info <configure name="GYRO_P" value="ADC_3"/>)
$(info </subsystem>)
$(info in your airframe file.)
# roll stabilization with gyro
#
# default values for tiny and twog are:
# ADC_GYRO_ROLL = ADC_3
# ADC_GYRO_NB_SAMPLES = 16
#
# to change just redefine these before including this file
#
ap.CFLAGS += -DADC_CHANNEL_GYRO_ROLL=$(ADC_GYRO_ROLL) -DUSE_$(ADC_GYRO_ROLL)
ap.CFLAGS += -DADC_CHANNEL_GYRO_NB_SAMPLES=$(ADC_GYRO_NB_SAMPLES)
ap.CFLAGS += -DUSE_GYRO -DADXRS150
ap.srcs += $(SRC_FIXEDWING)/gyro.c
$(error The gyro_pitch subsystem has been removed)