mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 08:22:43 +08:00
Merge branch 'master' into ahrs_refactor
* master: (75 commits) [maps] hopefully finally fix google maps version download [rotorcraft] navigation: use NAV_FREQ to update stage and block time [simulator] use unconnected socket for FlightGear viz remove trailing whitespaces source and xml files should not be executable [modules] flight_time: move settings into module xml file [settings] remove some obsolete files [modules] flight_benchmark: move settings into module xml file [gps] refactor sendng of SVINFO [modules] dc: use state interface for utm position [airframes] replace joystick subsystem by USE_JOYSTICK [paparazzi.py] Produces .md with branch description [modules] airspeed_ets: retry after failed transaction dox fixes Correct mode behaviour joystick [ahrs] quaternion integrator fix [conf][joystick] update some joysticks with kill_throttle examples [math][dox] add some dox about euler convention [modules][messages] add AMSL message to air_data [modules] air_data: init vars as unknown ...
This commit is contained in:
+2
-4
@@ -122,14 +122,12 @@ paparazzi.sublime-workspace
|
||||
/sw/logalizer/gtk_export.ml
|
||||
/sw/logalizer/sd2log
|
||||
/sw/logalizer/plotprofile
|
||||
/sw/logalizer/ahrsview
|
||||
/sw/logalizer/ctrlstick
|
||||
/sw/logalizer/ffjoystick
|
||||
/sw/logalizer/imuview
|
||||
/sw/logalizer/ivy_example
|
||||
/sw/logalizer/motor_bench
|
||||
/sw/logalizer/tmclient
|
||||
/sw/logalizer/openlog2tlm
|
||||
/sw/logalizer/ahrs2fg
|
||||
/sw/logalizer/disp3d
|
||||
|
||||
# /sw/simulator/
|
||||
/sw/simulator/gaia
|
||||
|
||||
@@ -655,7 +655,7 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = doc/manual \
|
||||
INPUT = README.md doc/manual \
|
||||
sw/airborne
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
|
||||
@@ -25,7 +25,9 @@ else
|
||||
TOOLCHAIN_FOUND = 1
|
||||
endif
|
||||
ifneq ($(TOOLCHAIN_FOUND),1)
|
||||
$(error Error: arm-none-eabi-gcc cross-compiler not found! Recommended toolchain is https://launchpad.net/gcc-arm-embedded)
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
$(error Error: arm-none-eabi-gcc cross-compiler not found! Recommended toolchain is https://launchpad.net/gcc-arm-embedded)
|
||||
endif
|
||||
endif
|
||||
|
||||
CC = $(PREFIX)-gcc
|
||||
|
||||
@@ -39,6 +39,7 @@ CFLAGS += $(LOCAL_CFLAGS)
|
||||
CFLAGS += -O$(OPT)
|
||||
CFLAGS += -g
|
||||
CFLAGS += -std=gnu99
|
||||
CFLAGS += $(shell pkg-config --cflags-only-I ivy-glib)
|
||||
|
||||
CXXFLAGS = -W -Wall
|
||||
CXXFLAGS += $(INCLUDES)
|
||||
@@ -46,6 +47,7 @@ CXXFLAGS += $($(TARGET).CFLAGS)
|
||||
CXXFLAGS += $(LOCAL_CFLAGS)
|
||||
CXXFLAGS += -O$(OPT)
|
||||
CXXFLAGS += -g
|
||||
CXXFLAGS += $(shell pkg-config --cflags-only-I ivy-glib)
|
||||
|
||||
LDFLAGS += $($(TARGET).LDFLAGS)
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ CFLAGS += -fPIC
|
||||
CFLAGS += -O$(OPT)
|
||||
CFLAGS += -g
|
||||
CFLAGS += -std=gnu99
|
||||
CFLAGS += $(shell pkg-config --cflags-only-I ivy-glib)
|
||||
|
||||
LDFLAGS = -lm
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
<field name="distance" type="float" unit="m"/>
|
||||
</message>
|
||||
|
||||
<message name="TEMPERATURE" id="3">
|
||||
<field name="temp" type="float" unit="deg Celcius"/>
|
||||
</message>
|
||||
|
||||
<message name="IMU_GYRO_INT32" id="4">
|
||||
<field name="stamp" type="uint32_t" unit="us"/>
|
||||
|
||||
@@ -195,12 +195,9 @@
|
||||
<define name="USE_AD1" value="1"/>
|
||||
<configure name="ACTUATORS" value="actuators_ppm"/>
|
||||
<define name="ADC_CHANNEL_VSUPPLY" value="AdcBank0\(6\)"/>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
</target>
|
||||
|
||||
<target name="sim" board="pc">
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="control"/>
|
||||
<subsystem name="navigation"/>
|
||||
</target>
|
||||
@@ -212,6 +209,7 @@
|
||||
<define name="LOITER_TRIM"/>
|
||||
<define name="RADIO_CONTROL_AUTO1"/>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
|
||||
<subsystem name="telemetry" type="xbee_api">
|
||||
<configure name="MODEM_PORT" value="UART0"/>
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
</load>
|
||||
<load name="airspeed_adc.xml">
|
||||
<configure name="ADC_AIRSPEED" value="ADC_1"/>
|
||||
<define name="AIRSPEED_QUADRATIC_SCALE" value="0.5"/>
|
||||
<define name="AIRSPEED_BIAS" value="430"/>
|
||||
<define name="AIRSPEED_ADC_QUADRATIC_SCALE" value="0.5"/>
|
||||
<define name="AIRSPEED_ADC_BIAS" value="430"/>
|
||||
<define name="MEASURE_AIRSPEED"/>
|
||||
<define name="AIRSPEED_SEND_RAW"/>
|
||||
</load>
|
||||
<load name="gps_ubx_ucenter.xml"/>
|
||||
<!--load name="sys_mon.xml"/-->
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<modules>
|
||||
<load name="airspeed_adc.xml">
|
||||
<configure name="ADC_AIRSPEED" value="ADC_0"/>
|
||||
<define name="AIRSPEED_QUADRATIC_SCALE" value="1.09378"/>
|
||||
<define name="AIRSPEED_BIAS" value="110"/>
|
||||
<define name="AIRSPEED_ADC_QUADRATIC_SCALE" value="1.09378"/>
|
||||
<define name="AIRSPEED_ADC_BIAS" value="110"/>
|
||||
</load>
|
||||
<load name="AOA_adc.xml">
|
||||
<configure name="ADC_AOA" value="ADC_2"/>
|
||||
|
||||
@@ -58,6 +58,7 @@ twog_1.0 + aspirin + ETS baro + ETS speed
|
||||
<define name="BARO_ETS_SYNC_SEND"/>
|
||||
</load>
|
||||
<load name="baro_sim.xml"/>
|
||||
<load name="air_data.xml"/>
|
||||
<load name="digital_cam.xml">
|
||||
<define name="DC_SHUTTER_GPIO" value="GPIOB,GPIO22"/><!-- 18:aux 22:camsw-->
|
||||
</load>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<modules>
|
||||
<load name="airspeed_ets.xml"/>
|
||||
<load name="baro_ets.xml"/>
|
||||
<load name="air_data.xml"/>
|
||||
<load name="infrared_adc.xml"/>
|
||||
</modules>
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<define name="LOITER_TRIM"/>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="joystick"/>
|
||||
|
||||
<!-- Communication -->
|
||||
<subsystem name="telemetry" type="transparent"/>
|
||||
<define name="USE_JOYSTICK" value="TRUE"/>
|
||||
|
||||
<!-- Actuators are automatically chosen according to board-->
|
||||
<subsystem name="control"/>
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<define name="LOITER_TRIM"/>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="joystick"/>
|
||||
|
||||
<!-- Communication -->
|
||||
<subsystem name="telemetry" type="transparent"/>
|
||||
<define name="USE_JOYSTICK" value="TRUE"/>
|
||||
|
||||
<!-- Actuators are automatically chosen according to board-->
|
||||
<subsystem name="control"/>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<modules>
|
||||
<load name="sys_mon.xml"/>
|
||||
<load name="baro_sim.xml"/>
|
||||
<load name="air_data.xml"/>
|
||||
|
||||
<!-- extra navigation routines -->
|
||||
<load name="nav_bungee_takeoff.xml"/>
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
|
||||
|
||||
<airframe name="Miniquad CHNI">
|
||||
|
||||
<firmware name="rotorcraft">
|
||||
<define name="USE_INS_NAV_INIT"/>
|
||||
<!--define name="GUIDANCE_H_USE_REF"/-->
|
||||
|
||||
<target name="ap" board="hbmini_1.0">
|
||||
<define name="FAILSAFE_GROUND_DETECT"/>
|
||||
<define name="USE_GPS_ACC4R"/>
|
||||
<define name="ACTUATORS_START_DELAY" value="3"/>
|
||||
</target>
|
||||
<target name="nps" board="pc">
|
||||
<subsystem name="fdm" type="jsbsim"/>
|
||||
</target>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="telemetry" type="transparent"/>
|
||||
<subsystem name="actuators" type="mkk">
|
||||
<define name="MKK_I2C_SCL_TIME" value="25"/>
|
||||
</subsystem>
|
||||
<subsystem name="motor_mixing"/>
|
||||
<subsystem name="imu" type="hbmini"/>
|
||||
<subsystem name="gps" type="ublox"/>
|
||||
<subsystem name="stabilization" type="int_euler"/>
|
||||
<subsystem name="ahrs" type="float_cmpl_rmat"/>
|
||||
<subsystem name="ins" type="hff"/>
|
||||
</firmware>
|
||||
|
||||
<modules main_freq="512">
|
||||
<load name="gps_ubx_ucenter.xml"/>
|
||||
</modules>
|
||||
|
||||
<section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
|
||||
<define name="NB" value="4"/>
|
||||
<!-- NW, SE, NE, SW -->
|
||||
<define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
|
||||
</section>
|
||||
|
||||
<servos driver="Mkk">
|
||||
<servo name="NW" no="0" min="0" neutral="10" max="100"/>
|
||||
<servo name="SE" no="1" min="0" neutral="10" max="100"/>
|
||||
<servo name="NE" no="2" min="0" neutral="10" max="100"/>
|
||||
<servo name="SW" no="3" min="0" neutral="10" max="100"/>
|
||||
</servos>
|
||||
|
||||
<commands>
|
||||
<axis name="PITCH" failsafe_value="0"/>
|
||||
<axis name="ROLL" failsafe_value="0"/>
|
||||
<axis name="YAW" failsafe_value="0"/>
|
||||
<axis name="THRUST" failsafe_value="0"/>
|
||||
</commands>
|
||||
|
||||
<section name="MIXING" prefix="MOTOR_MIXING_">
|
||||
<define name="TRIM_ROLL" value="135"/>
|
||||
<define name="TRIM_PITCH" value="-200"/>
|
||||
<define name="TRIM_YAW" value="-300"/>
|
||||
<define name="NB_MOTOR" value="4"/>
|
||||
<define name="SCALE" value="256"/>
|
||||
<define name="ROLL_COEF" value="{ 256, -256, -256, 256}"/>
|
||||
<define name="PITCH_COEF" value="{ 256, -256, 256, -256}"/>
|
||||
<define name="YAW_COEF" value="{ 256, 256, -256, -256}"/>
|
||||
<define name="THRUST_COEF" value="{ 256, 256, 256, 256}"/>
|
||||
</section>
|
||||
|
||||
<command_laws>
|
||||
<call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/>
|
||||
<set servo="NW" value="motor_mixing.commands[0]"/>
|
||||
<set servo="SE" value="motor_mixing.commands[1]"/>
|
||||
<set servo="NE" value="motor_mixing.commands[2]"/>
|
||||
<set servo="SW" value="motor_mixing.commands[3]"/>
|
||||
</command_laws>
|
||||
|
||||
|
||||
<section name="IMU" prefix="IMU_">
|
||||
|
||||
<define name="GYRO_P_NEUTRAL" value="21460"/>
|
||||
<define name="GYRO_Q_NEUTRAL" value="21490"/>
|
||||
<define name="GYRO_R_NEUTRAL" value="21830"/>
|
||||
|
||||
<define name="GYRO_P_SENS" value="5.79" integer="16"/>
|
||||
<define name="GYRO_Q_SENS" value="5.89" integer="16"/>
|
||||
<define name="GYRO_R_SENS" value="4.56" integer="16"/>
|
||||
|
||||
|
||||
<define name="ACCEL_X_NEUTRAL" value="26480"/>
|
||||
<define name="ACCEL_Y_NEUTRAL" value="26380"/>
|
||||
<define name="ACCEL_Z_NEUTRAL" value="25836"/>
|
||||
<define name="ACCEL_X_SENS" value="1.94" integer="16"/>
|
||||
<define name="ACCEL_Y_SENS" value="1.94" integer="16"/>
|
||||
<define name="ACCEL_Z_SENS" value="1.99" integer="16"/>
|
||||
|
||||
|
||||
<define name="MAG_X_NEUTRAL" value="-108"/>
|
||||
<define name="MAG_Y_NEUTRAL" value="57"/>
|
||||
<define name="MAG_Z_NEUTRAL" value="-95"/>
|
||||
<define name="MAG_X_SENS" value="3.6472944636" integer="16"/>
|
||||
<define name="MAG_Y_SENS" value="3.09086502241" integer="16"/>
|
||||
<define name="MAG_Z_SENS" value="3.74963511486" integer="16"/>
|
||||
|
||||
<define name="BODY_TO_IMU_PHI" value="-2.5" unit="deg"/>
|
||||
<define name="BODY_TO_IMU_THETA" value="-2.0" unit="deg"/>
|
||||
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="AHRS" prefix="AHRS_">
|
||||
<define name="H_X" value="0.366765"/>
|
||||
<define name="H_Y" value="0.013312"/>
|
||||
<define name="H_Z" value="0.930219"/>
|
||||
</section>
|
||||
|
||||
<section name="STABILIZATION_RATE" prefix="STABILIZATION_RATE_">
|
||||
|
||||
<define name="SP_MAX_P" value="10000"/>
|
||||
<define name="SP_MAX_Q" value="10000"/>
|
||||
<define name="SP_MAX_R" value="10000"/>
|
||||
|
||||
<define name="GAIN_P" value="481"/>
|
||||
<define name="GAIN_Q" value="485"/>
|
||||
<define name="GAIN_R" value="465"/>
|
||||
|
||||
</section>
|
||||
|
||||
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
|
||||
|
||||
<!-- setpoints -->
|
||||
<define name="SP_MAX_PHI" value="45." unit="deg"/>
|
||||
<define name="SP_MAX_THETA" value="45." unit="deg"/>
|
||||
<define name="SP_MAX_R" value="220." unit="deg/s"/>
|
||||
<define name="DEADBAND_R" value="250"/>
|
||||
|
||||
<!-- reference -->
|
||||
<define name="REF_OMEGA_P" value="400" unit="deg/s"/>
|
||||
<define name="REF_ZETA_P" value="0.9"/>
|
||||
<define name="REF_MAX_P" value="400." unit="deg/s"/>
|
||||
<define name="REF_MAX_PDOT" value="RadOfDeg(7000.)"/>
|
||||
|
||||
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/>
|
||||
<define name="REF_ZETA_Q" value="0.9"/>
|
||||
<define name="REF_MAX_Q" value="400." unit="deg/s"/>
|
||||
<define name="REF_MAX_QDOT" value="RadOfDeg(7000.)"/>
|
||||
|
||||
<define name="REF_OMEGA_R" value="500" unit="deg/s"/>
|
||||
<define name="REF_ZETA_R" value="0.9"/>
|
||||
<define name="REF_MAX_R" value="180." unit="deg/s"/>
|
||||
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/>
|
||||
|
||||
<!-- feedback -->
|
||||
<define name="PHI_PGAIN" value="880"/>
|
||||
<define name="PHI_DGAIN" value="400"/>
|
||||
<define name="PHI_IGAIN" value="300"/>
|
||||
|
||||
<define name="THETA_PGAIN" value="880"/>
|
||||
<define name="THETA_DGAIN" value="400"/>
|
||||
<define name="THETA_IGAIN" value="300"/>
|
||||
|
||||
<define name="PSI_PGAIN" value="600"/>
|
||||
<define name="PSI_DGAIN" value="320"/>
|
||||
<define name="PSI_IGAIN" value="150"/>
|
||||
|
||||
<!-- feedforward -->
|
||||
<define name="PHI_DDGAIN" value="100"/>
|
||||
<define name="THETA_DDGAIN" value="100"/>
|
||||
<define name="PSI_DDGAIN" value="0"/>
|
||||
|
||||
<define name="PHI_AGAIN" value="0"/>
|
||||
<define name="THETA_AGAIN" value="0"/>
|
||||
<define name="PSI_AGAIN" value="0"/>
|
||||
</section>
|
||||
|
||||
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
|
||||
|
||||
<define name="REF_MIN_ZDD" value="-0.5*9.81"/>
|
||||
<define name="REF_MAX_ZDD" value=" 0.5*9.81"/>
|
||||
<define name="REF_MIN_ZD" value="-1.5"/>
|
||||
<define name="REF_MAX_ZD" value=" 1.5"/>
|
||||
<define name="HOVER_KP" value="70"/>
|
||||
<define name="HOVER_KD" value="100"/>
|
||||
<define name="HOVER_KI" value="9"/>
|
||||
<!-- SPEED_BFP_OF_REAL(1.5) / (MAX_PPRZ/2) -->
|
||||
<!-- SPEED_BFP_OF_REAL(1.5) * 20% -->
|
||||
<define name="ADAPT_NOISE_FACTOR" value="1.5"/>
|
||||
</section>
|
||||
|
||||
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
|
||||
<define name="MAX_BANK" value="30" unit="deg"/>
|
||||
<define name="PGAIN" value="80"/>
|
||||
<define name="DGAIN" value="140"/>
|
||||
<define name="IGAIN" value="10"/>
|
||||
<define name="NGAIN" value="0"/>
|
||||
<!-- feedforward -->
|
||||
<define name="AGAIN" value="0"/>
|
||||
</section>
|
||||
|
||||
<section name="BAT">
|
||||
<define name="CATASTROPHIC_BAT_LEVEL" value="6.0" unit="V"/>
|
||||
<define name="CRITIC_BAT_LEVEL" value="6.5" unit="V"/>
|
||||
<define name="LOW_BAT_LEVEL" value="7.0" unit="V"/>
|
||||
<define name="MAX_BAT_LEVEL" value="8.4" unit="V"/>
|
||||
</section>
|
||||
|
||||
|
||||
<section name="AUTOPILOT">
|
||||
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
|
||||
<define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/>
|
||||
<!--define name="MODE_AUTO2" value="AP_MODE_ATTITUDE_Z_HOLD"/-->
|
||||
<define name="MODE_AUTO2" value="AP_MODE_HOVER_Z_HOLD"/>
|
||||
</section>
|
||||
|
||||
<section name="FMS">
|
||||
<define name="BOOZ_FMS_TIMEOUT" value="0"/>
|
||||
</section>
|
||||
|
||||
<section name="MISC">
|
||||
<define name="DEFAULT_CIRCLE_RADIUS" value="10."/>
|
||||
</section>
|
||||
|
||||
<section name="GCS">
|
||||
<define name="ALT_SHIFT_PLUS_PLUS" value="5"/>
|
||||
<define name="ALT_SHIFT_PLUS" value="1"/>
|
||||
<define name="ALT_SHIFT_MINUS" value="-1"/>
|
||||
</section>
|
||||
|
||||
<section name="SIMULATOR" prefix="NPS_">
|
||||
<define name="ACTUATOR_NAMES" value="{"nw_motor", "se_motor", "ne_motor", "sw_motor"}"/>
|
||||
<define name="JSBSIM_INIT" value=""reset00""/>
|
||||
<define name="JSBSIM_MODEL" value=""simple_x_quad""/>
|
||||
<define name="SENSORS_PARAMS" value=""nps_sensors_params_hbmini.h""/>
|
||||
<!-- mode switch on joystick channel 5 (axis numbering starting at zero) -->
|
||||
<define name="JS_AXIS_MODE" value="4"/>
|
||||
</section>
|
||||
|
||||
</airframe>
|
||||
@@ -70,6 +70,7 @@
|
||||
</load>
|
||||
<load name="gps_ubx_ucenter.xml"/>
|
||||
<load name="geo_mag.xml"/>
|
||||
<load name="air_data.xml"/>
|
||||
</modules>
|
||||
|
||||
<servos driver="Pwm">
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<define name="TRIM_YAW" value="0"/>
|
||||
<define name="NB_MOTOR" value="4"/>
|
||||
<define name="SCALE" value="256"/>
|
||||
<!-- FRONT CW, RIGHT CCW, BACK CW, LEFT CCW -->
|
||||
<define name="ROLL_COEF" value="{ 0, -256, 0, 256}"/>
|
||||
<define name="PITCH_COEF" value="{ 256, 0, -256, 0}"/>
|
||||
<define name="YAW_COEF" value="{ -256, 256, -256, 256}"/>
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
<section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
|
||||
<define name="NB" value="4"/>
|
||||
<!-- FRONT, BACK, RIGHT, LEFT -->
|
||||
<!-- FRONT CW, RIGHT CCW, BACK CW, LEFT CCW -->
|
||||
<define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
|
||||
</section>
|
||||
|
||||
@@ -255,8 +256,7 @@
|
||||
</section>
|
||||
|
||||
<section name="SIMULATOR" prefix="NPS_">
|
||||
<define name="ACTUATOR_NAMES" value="{"front_motor", "back_motor", "right_motor", "left_motor"}"/>
|
||||
<define name="JSBSIM_INIT" value=""reset00""/>
|
||||
<define name="ACTUATOR_NAMES" value="{"front_motor", "right_motor", "back_motor", "left_motor"}"/>
|
||||
<define name="JSBSIM_MODEL" value=""simple_quad""/>
|
||||
<define name="SENSORS_PARAMS" value=""nps_sensors_params_default.h""/>
|
||||
</section>
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
<load name="nav_catapult.xml"/>
|
||||
<load name="nav_line.xml"/>
|
||||
|
||||
<load name="air_data.xml"/>
|
||||
</modules>
|
||||
|
||||
<firmware name="fixedwing">
|
||||
@@ -253,6 +253,8 @@
|
||||
</target>
|
||||
|
||||
<target name="fbw" board="lisa_m_2.0">
|
||||
<configure name="SEPARATE_FBW" value="1"/>
|
||||
|
||||
<configure name="SYS_TIME_LED" value="2"/>
|
||||
<define name="RADIO_CONTROL_LED" value="4"/>
|
||||
<define name="LINK_MCU_LED" value="3"/>
|
||||
@@ -260,8 +262,6 @@
|
||||
<define name="OUTBACK_CHALLENGE_DANGEROUS_RULE_RC_LOST_NO_AP" value="1"/>
|
||||
<define name="OUTBACK_CHALLENGE_VERY_DANGEROUS_RULE_AP_CAN_FORCE_FAILSAFE" value="1"/>
|
||||
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
|
||||
<!-- split of ap/fbw specific subsystems for fbw -->
|
||||
<subsystem name="actuators" type="pwm"/>
|
||||
<subsystem name="intermcu" type="uart">
|
||||
@@ -270,7 +270,6 @@
|
||||
</target>
|
||||
|
||||
<target name="sim" board="pc">
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="control"/>
|
||||
<subsystem name="navigation"/>
|
||||
</target>
|
||||
@@ -285,6 +284,10 @@
|
||||
<define name="WIND_INFO_RET"/>
|
||||
<define name="RADIO_CONTROL_AUTO1"/>
|
||||
|
||||
<subsystem name="radio_control" type="spektrum">
|
||||
<define name="RADIO_CONTROL_NB_CHANNEL" value="8"/>
|
||||
</subsystem>
|
||||
|
||||
<!-- Communication -->
|
||||
<subsystem name="telemetry" type="transparent">
|
||||
<configure name="MODEM_BAUD" value="B9600"/>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<subsystem name="ahrs" type="infrared"/>
|
||||
<subsystem name="gps" type="ublox_hitl"/>
|
||||
<subsystem name="navigation"/>
|
||||
<subsystem name="joystick"/>
|
||||
<subsystem name="ins" type="gps_passthrough"/>
|
||||
<define name="USE_JOYSTICK" value="TRUE"/>
|
||||
</firmware>
|
||||
|
||||
<firmware name="setup">
|
||||
|
||||
@@ -46,3 +46,6 @@ GPS_BAUD ?= B38400
|
||||
# e.g. <servo driver="Ppm">
|
||||
#
|
||||
ACTUATORS ?= actuators_pwm
|
||||
|
||||
# always enable SEPARATE_FBW
|
||||
SEPARATE_FBW = 1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# hbmini_1.0.makefile
|
||||
#
|
||||
# prototype for HBMini board
|
||||
#
|
||||
|
||||
ARCH=lpc21
|
||||
|
||||
BOARD=hbmini
|
||||
BOARD_VERSION=1.0
|
||||
|
||||
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
|
||||
|
||||
FLASH_MODE ?= IAP
|
||||
|
||||
|
||||
LPC21ISP_BAUD = 38400
|
||||
LPC21ISP_XTAL = 12000
|
||||
|
||||
|
||||
#
|
||||
# default LED configuration
|
||||
#
|
||||
RADIO_CONTROL_LED ?= none
|
||||
BARO_LED ?= none
|
||||
AHRS_ALIGNER_LED ?= none
|
||||
GPS_LED ?= none
|
||||
SYS_TIME_LED ?= none
|
||||
|
||||
|
||||
#
|
||||
# default uart settings
|
||||
#
|
||||
MODEM_PORT ?= UART0
|
||||
MODEM_BAUD ?= B57600
|
||||
|
||||
GPS_PORT ?= UART1
|
||||
GPS_BAUD ?= B38400
|
||||
|
||||
# All targets on the HBMini board run on the same processor achitecture
|
||||
$(TARGET).ARCHDIR = $(ARCH)
|
||||
|
||||
@@ -186,6 +186,17 @@
|
||||
settings_modules=""
|
||||
gui_color="blue"
|
||||
/>
|
||||
<aircraft
|
||||
name="Quad_HBMini"
|
||||
ac_id="152"
|
||||
airframe="airframes/examples/quadrotor_hbmini.xml"
|
||||
radio="radios/dx6iCHNI.xml"
|
||||
telemetry="telemetry/default_rotorcraft.xml"
|
||||
flight_plan="flight_plans/rotorcraft_basic.xml"
|
||||
settings="settings/rotorcraft_basic.xml settings/control/rotorcraft_guidance.xml settings/control/stabilization_att_int.xml"
|
||||
settings_modules="modules/gps_ubx_ucenter.xml"
|
||||
gui_color="white"
|
||||
/>
|
||||
<aircraft
|
||||
name="Quad_LisaMX"
|
||||
ac_id="30"
|
||||
|
||||
@@ -73,10 +73,8 @@ $(TARGET).srcs += subsystems/commands.c
|
||||
$(TARGET).srcs += state.c
|
||||
|
||||
#
|
||||
# AIR DATA and BARO (if needed)
|
||||
# BARO_BOARD (if existing/configured)
|
||||
#
|
||||
$(TARGET).srcs += subsystems/air_data.c
|
||||
|
||||
include $(CFG_SHARED)/baro_board.makefile
|
||||
|
||||
|
||||
|
||||
@@ -161,8 +161,6 @@ ap_srcs += state.c
|
||||
ap_srcs += subsystems/settings.c
|
||||
ap_srcs += $(SRC_ARCH)/subsystems/settings_arch.c
|
||||
|
||||
# AIR DATA
|
||||
ap_srcs += subsystems/air_data.c
|
||||
|
||||
# BARO
|
||||
include $(CFG_SHARED)/baro_board.makefile
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
# InterMCU type CAN
|
||||
|
||||
ifneq ($(TARGET),sim)
|
||||
|
||||
# make sure that SEPARATE_FBW is configured
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
$(error Using intermcu via CAN, so dual mcu with separate fbw. Please add <configure name="SEPARATE_FBW" value="1"/>)
|
||||
endif
|
||||
|
||||
|
||||
$(TARGET).CFLAGS += -DINTER_MCU -DMCU_CAN_LINK
|
||||
$(TARGET).srcs += link_mcu_can.c
|
||||
$(TARGET).srcs += mcu_periph/can.c
|
||||
$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/can_arch.c
|
||||
endif
|
||||
|
||||
SEPARATE_FBW=1
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
# InterMCU type SPI
|
||||
|
||||
# make sure that SEPARATE_FBW is configured
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
$(error Using intermcu via SPI, so dual mcu with separate fbw. Please add <configure name="SEPARATE_FBW" value="1"/>)
|
||||
endif
|
||||
|
||||
ifeq ($(INTER_MCU_SPI),)
|
||||
INTER_MCU_SPI = SPI1
|
||||
endif
|
||||
@@ -15,4 +20,3 @@ fbw.srcs += $(SRC_FIXEDWING)/link_mcu_spi.c mcu_periph/spi.c $(SRC_ARCH)/mcu_
|
||||
ap_srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
ap.CFLAGS += -DMCU_SPI_LINK -DUSE_$(INTER_MCU_SPI) -DSPI_MASTER -DUSE_SPI_$(INTER_MCU_SLAVE) -DUSE_SPI
|
||||
ap.srcs += $(SRC_FIXEDWING)/link_mcu_spi.c mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c
|
||||
SEPARATE_FBW = 1
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
# InterMCU type UART
|
||||
|
||||
# make sure that SEPARATE_FBW is configured
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
$(error Using intermcu via UART, so dual mcu with separate fbw. Please add <configure name="SEPARATE_FBW" value="1"/>)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET),fbw)
|
||||
ifeq ($(INTERMCU_PORT),none)
|
||||
@@ -19,14 +23,3 @@ ifneq ($(TARGET),sim)
|
||||
$(TARGET).CFLAGS += -DINTER_MCU -DMCU_UART_LINK
|
||||
$(TARGET).srcs += ./link_mcu_usart.c
|
||||
endif
|
||||
|
||||
|
||||
|
||||
#############################
|
||||
# CAN:
|
||||
# fbw.srcs += ./link_mcu_can.c ./mcu_periph/can.c ./arch/stm32/mcu_periph/can_arch.c
|
||||
# fbw.CFLAGS += -DINTER_MCU -DMCU_CAN_LINK
|
||||
# $(TARGET).CFLAGS += -DCAN_SJW_TQ=CAN_SJW_1tq -DCAN_BS1_TQ=CAN_BS1_3tq -DCAN_BS2_TQ=CAN_BS2_4tq -DCAN_PRESCALER=12 -DUSE_CAN -DUSE_CAN1 -DUSE_USB_LP_CAN1_RX0_IRQ -DCAN_ERR_RESUME=DISABLE
|
||||
|
||||
SEPARATE_FBW=1
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ USE_MAGNETOMETER ?= 1
|
||||
INS_CFLAGS += -DAHRS_TYPE_H=\"subsystems/ins/ins_float_invariant.h\"
|
||||
INS_CFLAGS += -DUSE_AHRS_ALIGNER
|
||||
INS_CFLAGS += -DUSE_AHRS
|
||||
# for geo mag
|
||||
INS_CFLAGS += -DAHRS_FLOAT
|
||||
|
||||
ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))
|
||||
INS_CFLAGS += -DUSE_MAGNETOMETER
|
||||
|
||||
@@ -131,6 +131,12 @@ else ifeq ($(BOARD), navgo)
|
||||
BARO_BOARD_SRCS += peripherals/mcp355x.c
|
||||
BARO_BOARD_SRCS += $(SRC_BOARD)/baro_board.c
|
||||
|
||||
# hbmini baro
|
||||
else ifeq ($(BOARD), hbmini)
|
||||
BARO_BOARD_CFLAGS += -DUSE_I2C1
|
||||
BARO_BOARD_SRCS += peripherals/bmp085.c
|
||||
BARO_BOARD_SRCS += $(SRC_BOARD)/baro_board.c
|
||||
|
||||
# krooz baro
|
||||
else ifeq ($(BOARD), krooz)
|
||||
BARO_BOARD_CFLAGS += -DBB_MS5611_I2C_DEV=i2c2
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
IMU_HBMINI_CFLAGS = -DUSE_IMU
|
||||
IMU_HBMINI_CFLAGS += -DIMU_TYPE_H=\"boards/hbmini/imu_hbmini.h\"
|
||||
|
||||
IMU_HBMINI_SRCS = $(SRC_SUBSYSTEMS)/imu.c \
|
||||
$(SRC_BOARD)/imu_hbmini.c
|
||||
|
||||
IMU_HBMINI_I2C_DEV ?= i2c1
|
||||
|
||||
IMU_HBMINI_CFLAGS += -DUSE_I2C
|
||||
IMU_HBMINI_CFLAGS += -DUSE_I2C1 -DI2C1_SCLL=25 -DI2C1_SCLH=25
|
||||
|
||||
IMU_HBMINI_CFLAGS += -DIMU_HBMINI_I2C_DEV=$(IMU_HBMINI_I2C_DEV)
|
||||
|
||||
IMU_HBMINI_SRCS += peripherals/hmc58xx.c
|
||||
|
||||
|
||||
include $(CFG_SHARED)/spi_master.makefile
|
||||
|
||||
IMU_HBMINI_CFLAGS += -DUSE_SPI_SLAVE0
|
||||
IMU_HBMINI_CFLAGS += -DUSE_SPI1
|
||||
IMU_HBMINI_CFLAGS += -DMAX1168_EOC_VIC_SLOT=11
|
||||
|
||||
IMU_HBMINI_SRCS += peripherals/max1168.c
|
||||
IMU_HBMINI_SRCS += $(SRC_ARCH)/peripherals/max1168_arch.c
|
||||
|
||||
ap.CFLAGS += $(IMU_HBMINI_CFLAGS)
|
||||
ap.srcs += $(IMU_HBMINI_SRCS)
|
||||
|
||||
#
|
||||
# Simulator
|
||||
#
|
||||
include $(CFG_SHARED)/imu_nps.makefile
|
||||
@@ -1,36 +1,38 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
|
||||
NORADIO = False
|
||||
|
||||
ifeq ($(BOARD),classix)
|
||||
ifeq ($(TARGET),ap)
|
||||
NORADIO = True
|
||||
endif
|
||||
endif
|
||||
|
||||
RADIO_CONTROL_DATALINK_LED ?= none
|
||||
RADIO_CONTROL_LED ?= none
|
||||
|
||||
ifeq ($(NORADIO), False)
|
||||
ifneq ($(RADIO_CONTROL_DATALINK_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_DATALINK_LED=$(RADIO_CONTROL_DATALINK_LED)
|
||||
endif
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
fbw.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/rc_datalink.h\"
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_DATALINK
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/rc_datalink.c
|
||||
# arch only with sim target for compatibility (empty functions)
|
||||
sim.srcs += $(SRC_ARCH)/subsystems/radio_control/rc_datalink.c
|
||||
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
ap.srcs += $(RC_SRCS)
|
||||
|
||||
test_radio_control.CFLAGS += $(RC_CFLAGS)
|
||||
test_radio_control.srcs += $(RC_SRCS)
|
||||
ifneq ($(RADIO_CONTROL_DATALINK_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_DATALINK_LED=$(RADIO_CONTROL_DATALINK_LED)
|
||||
endif
|
||||
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"radio_control/rc_datalink.h\"
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_TYPE_DATALINK
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/rc_datalink.c
|
||||
|
||||
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
# arch only with sim target for compatibility (empty functions)
|
||||
sim.srcs += $(SRC_ARCH)/subsystems/radio_control/rc_datalink.c
|
||||
|
||||
@@ -2,37 +2,43 @@
|
||||
# Makefile for shared radio_control ppm subsystem
|
||||
#
|
||||
|
||||
NORADIO = False
|
||||
RADIO_CONTROL_LED ?= none
|
||||
|
||||
ifeq ($(BOARD),classix)
|
||||
ifeq ($(TARGET),ap)
|
||||
NORADIO = True
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\"
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_TYPE_PPM
|
||||
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/ppm.c
|
||||
RC_SRCS += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c
|
||||
|
||||
ifeq ($(ARCH),stm32)
|
||||
ifdef RADIO_CONTROL_PPM_PIN
|
||||
ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 UART1_RX))
|
||||
$(TARGET).CFLAGS += -DPPM_CONFIG=1
|
||||
else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 SERVO6))
|
||||
$(TARGET).CFLAGS += -DPPM_CONFIG=2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(NORADIO), False)
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
fbw.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
test_radio_control.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/ppm.h\"
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_PPM
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/ppm.c
|
||||
$(TARGET).srcs += $(SRC_ARCH)/subsystems/radio_control/ppm_arch.c
|
||||
|
||||
ifeq ($(ARCH),stm32)
|
||||
ifdef RADIO_CONTROL_PPM_PIN
|
||||
ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 UART1_RX))
|
||||
$(TARGET).CFLAGS += -DPPM_CONFIG=1
|
||||
else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 SERVO6))
|
||||
$(TARGET).CFLAGS += -DPPM_CONFIG=2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
# dummy stuff so you don't have to unload superbitrf.xml settings file for simulators
|
||||
|
||||
@@ -8,22 +8,31 @@ ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus.h\"
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL
|
||||
|
||||
# convert SBUS_PORT to upper and lower case strings:
|
||||
SBUS_PORT_UPPER=$(shell echo $(SBUS_PORT) | tr a-z A-Z)
|
||||
SBUS_PORT_LOWER=$(shell echo $(SBUS_PORT) | tr A-Z a-z)
|
||||
|
||||
RC_CFLAGS += -DUSE_$(SBUS_PORT_UPPER) -D$(SBUS_PORT_UPPER)_BAUD=B100000
|
||||
RC_CFLAGS += -DSBUS_UART_DEV=$(SBUS_PORT_LOWER)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus.h\"
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_SBUS
|
||||
RC_FBW_CFLAGS += -DUSE_$(SBUS_PORT_UPPER) -D$(SBUS_PORT_UPPER)_BAUD=B100000
|
||||
RC_FBW_CFLAGS += -DSBUS_UART_DEV=$(SBUS_PORT_LOWER)
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_TYPE_SBUS
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/sbus.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/sbus_common.c
|
||||
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
ap.srcs += $(RC_SRCS)
|
||||
|
||||
test_radio_control.CFLAGS += $(RC_CFLAGS)
|
||||
test_radio_control.srcs += $(RC_SRCS)
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
@@ -14,8 +14,9 @@ ifneq ($(RADIO_CONTROL_LED),none)
|
||||
ap.CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus.h\"
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL
|
||||
|
||||
# convert SBUS_PORT to upper and lower case strings:
|
||||
SBUS1_PORT_UPPER=$(shell echo $(SBUS1_PORT) | tr a-z A-Z)
|
||||
@@ -23,13 +24,26 @@ SBUS1_PORT_LOWER=$(shell echo $(SBUS1_PORT) | tr A-Z a-z)
|
||||
SBUS2_PORT_UPPER=$(shell echo $(SBUS2_PORT) | tr a-z A-Z)
|
||||
SBUS2_PORT_LOWER=$(shell echo $(SBUS2_PORT) | tr A-Z a-z)
|
||||
|
||||
$(TARGET).CFLAGS += -DUSE_$(SBUS1_PORT_UPPER) -D$(SBUS1_PORT_UPPER)_BAUD=B100000
|
||||
$(TARGET).CFLAGS += -DUSE_$(SBUS2_PORT_UPPER) -D$(SBUS2_PORT_UPPER)_BAUD=B100000
|
||||
$(TARGET).CFLAGS += -DSBUS1_UART_DEV=$(SBUS1_PORT_LOWER)
|
||||
$(TARGET).CFLAGS += -DSBUS2_UART_DEV=$(SBUS2_PORT_LOWER)
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus_dual.h\"
|
||||
$(TARGET).CFLAGS += -DRADIO_CONTROL_TYPE_SBUS
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/sbus_dual.c
|
||||
$(TARGET).srcs += $(SRC_SUBSYSTEMS)/radio_control/sbus_common.c
|
||||
RC_FBW_CFLAGS += -DUSE_$(SBUS1_PORT_UPPER) -D$(SBUS1_PORT_UPPER)_BAUD=B100000
|
||||
RC_FBW_CFLAGS += -DUSE_$(SBUS2_PORT_UPPER) -D$(SBUS2_PORT_UPPER)_BAUD=B100000
|
||||
RC_FBW_CFLAGS += -DSBUS1_UART_DEV=$(SBUS1_PORT_LOWER)
|
||||
RC_FBW_CFLAGS += -DSBUS2_UART_DEV=$(SBUS2_PORT_LOWER)
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/sbus_dual.h\"
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_TYPE_SBUS
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/sbus_dual.c
|
||||
RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control/sbus_common.c
|
||||
|
||||
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
@@ -4,26 +4,29 @@
|
||||
|
||||
RADIO_CONTROL_LED ?= none
|
||||
|
||||
ifndef RADIO_CONTROL_SPEKTRUM_MODEL
|
||||
RADIO_CONTROL_SPEKTRUM_MODEL=\"subsystems/radio_control/spektrum_dx7se.h\"
|
||||
endif
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\"
|
||||
ifeq ($(ARCH), lpc21)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL)
|
||||
endif
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
RC_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)
|
||||
RC_CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/spektrum.h\"
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ifndef RADIO_CONTROL_SPEKTRUM_MODEL
|
||||
RADIO_CONTROL_SPEKTRUM_MODEL=\"subsystems/radio_control/spektrum_dx7se.h\"
|
||||
endif
|
||||
RC_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL)
|
||||
endif
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_BIND_IMPL_FUNC=radio_control_spektrum_try_bind
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_PRIMARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)
|
||||
RC_FBW_CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT)_IRQ_HANDLER
|
||||
|
||||
# enable the second spektrum port if so configured
|
||||
ifdef USE_SECONDARY_SPEKTRUM_RECEIVER
|
||||
ifneq ($(USE_SECONDARY_SPEKTRUM_RECEIVER),0)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)
|
||||
RC_CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)_IRQ_HANDLER
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL_SPEKTRUM_SECONDARY_PORT=SPEKTRUM_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)
|
||||
RC_FBW_CFLAGS += -DOVERRIDE_$(RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT)_IRQ_HANDLER
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -31,8 +34,19 @@ RC_SRCS += $(SRC_SUBSYSTEMS)/radio_control.c \
|
||||
$(SRC_SUBSYSTEMS)/radio_control/spektrum.c \
|
||||
$(SRC_ARCH)/subsystems/radio_control/spektrum_arch.c
|
||||
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
|
||||
test_radio_control.CFLAGS += $(RC_CFLAGS)
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
test_radio_control.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
test_radio_control.srcs += $(RC_SRCS)
|
||||
|
||||
@@ -3,21 +3,30 @@
|
||||
#
|
||||
|
||||
RADIO_CONTROL_LED ?= none
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE_SUPERBITRF -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/superbitrf_rc.h\"
|
||||
RC_CFLAGS += -DUSE_SUPERBITRF -DUSE_SPI2 -DUSE_SPI_SLAVE2
|
||||
|
||||
ifneq ($(RADIO_CONTROL_LED),none)
|
||||
RC_CFLAGS += -DRADIO_CONTROL_LED=$(RADIO_CONTROL_LED)
|
||||
endif
|
||||
|
||||
RC_CFLAGS += -DRADIO_CONTROL_TYPE_H=\"subsystems/radio_control/superbitrf_rc.h\"
|
||||
|
||||
RC_FBW_CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE_SUPERBITRF
|
||||
RC_FBW_CFLAGS += -DUSE_SUPERBITRF -DUSE_SPI2 -DUSE_SPI_SLAVE2
|
||||
|
||||
RC_SRCS += peripherals/cyrf6936.c \
|
||||
$(SRC_SUBSYSTEMS)/datalink/superbitrf.c\
|
||||
$(SRC_SUBSYSTEMS)/radio_control.c \
|
||||
$(SRC_SUBSYSTEMS)/radio_control/superbitrf_rc.c
|
||||
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
ap.srcs += $(RC_SRCS)
|
||||
|
||||
test_radio_control.CFLAGS += $(RC_CFLAGS)
|
||||
test_radio_control.srcs += $(RC_SRCS)
|
||||
ifeq (,$(findstring $(SEPARATE_FBW),1 TRUE))
|
||||
# Single MCU's run RC on ap target
|
||||
$(TARGET).CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
$(TARGET).srcs += $(RC_SRCS)
|
||||
else
|
||||
# Dual MCU case
|
||||
fbw.CFLAGS += $(RC_CFLAGS) $(RC_FBW_CFLAGS)
|
||||
fbw.srcs += $(RC_SRCS)
|
||||
# define RADIO_CONTROL_TYPE for ap in dual_mcu case to get defines
|
||||
# but don't add source files
|
||||
ap.CFLAGS += $(RC_CFLAGS)
|
||||
endif
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -0,0 +1,20 @@
|
||||
<joystick>
|
||||
<input>
|
||||
<axis index="1" name="roll" />
|
||||
<axis index="2" name="pitch" />
|
||||
<axis index="0" name="throttle" />
|
||||
<axis index="4" name="yaw" />
|
||||
<axis index="3" name="mode" />
|
||||
</input>
|
||||
|
||||
<messages period="0.025">
|
||||
<message class="datalink" name="RC_4CH" send_always="true">
|
||||
<field name="mode" value="Fit(mode,-117,117,0,127)" />
|
||||
<field name="throttle" value="Fit(throttle,-117,117,0,127)" />
|
||||
<field name="roll" value="-roll" />
|
||||
<field name="yaw" value="-yaw" />
|
||||
<field name="pitch" value="-pitch" />
|
||||
</message>
|
||||
</messages>
|
||||
|
||||
</joystick>
|
||||
@@ -40,11 +40,11 @@ It has 8 buttons.
|
||||
<button index="3" name="b_yellow"/>
|
||||
<button index="4" name="b_ltb"/>
|
||||
<button index="5" name="b_rtb"/>
|
||||
<button index="6" name="b_start"/>
|
||||
<button index="7" name="b7"/>
|
||||
<button index="6" name="b_back"/>
|
||||
<button index="7" name="b_start"/>
|
||||
<button index="8" name="b8"/>
|
||||
<button index="9" name="b9"/>
|
||||
<button index="10" name="b_back"/>
|
||||
<button index="10" name="b10"/>
|
||||
</input>
|
||||
|
||||
<variables>
|
||||
@@ -108,6 +108,17 @@ It has 8 buttons.
|
||||
</message>
|
||||
-->
|
||||
|
||||
<!-- resurrect throttle on start button -->
|
||||
<message class="ground" name="DL_SETTING" on_event="b_start">
|
||||
<field name="index" value="IndexOfSetting(kill_throttle)"/>
|
||||
<field name="value" value="0"/>
|
||||
</message>
|
||||
<!-- kill throttle when pressing both back and blue buttons at the same time -->
|
||||
<message class="ground" name="DL_SETTING" on_event="b_back && b_blue">
|
||||
<field name="index" value="IndexOfSetting(kill_throttle)"/>
|
||||
<field name="value" value="1"/>
|
||||
</message>
|
||||
|
||||
</messages>
|
||||
|
||||
</joystick>
|
||||
|
||||
@@ -74,5 +74,11 @@ so e.g. HatDown(hat)
|
||||
<field name="block_id" value="IndexOfBlock('land here')"/>
|
||||
</message>
|
||||
|
||||
<!-- kill throttle when pressing both fire buttons at the same time -->
|
||||
<message class="ground" name="DL_SETTING" on_event="fire && fire2">
|
||||
<field name="index" value="IndexOfSetting(kill_throttle)"/>
|
||||
<field name="value" value="1"/>
|
||||
</message>
|
||||
|
||||
</messages>
|
||||
</joystick>
|
||||
|
||||
+25
-5
@@ -1172,7 +1172,11 @@
|
||||
<field name="status" type="uint8" values="UNINIT|RUNNING|LOCKED"/>
|
||||
</message>
|
||||
|
||||
<!-- 138 is free -->
|
||||
<message name="AIRSPEED_MS45XX" id="138">
|
||||
<field name="diffPress" type="float" unit="Pa"/>
|
||||
<field name="temperature" type="int16" unit="0.1 deg_celcius" alt_unit="deg_celcius" alt_unit_coef="0.1"/>
|
||||
<field name="airspeed" type="float" unit="m/s"/>
|
||||
</message>
|
||||
|
||||
<message name="FILTER_COR" id="139">
|
||||
<field name="mphi" type="int32"/>
|
||||
@@ -1293,7 +1297,6 @@
|
||||
<field name="cmd_heading" type="int32"/>
|
||||
</message>
|
||||
|
||||
|
||||
<message name="ROTORCRAFT_FP" id="147">
|
||||
<field name="east" type="int32" alt_unit="m" alt_unit_coef="0.0039063"/>
|
||||
<field name="north" type="int32" alt_unit="m" alt_unit_coef="0.0039063"/>
|
||||
@@ -1312,7 +1315,11 @@
|
||||
<field name="flight_time" type="uint16" unit="s"/>
|
||||
</message>
|
||||
|
||||
<!-- 148 is free -->
|
||||
<message name="TEMP_ADC" id="148">
|
||||
<field name="temp1" type="float" unit="deg_celsius" format="%.2f"/>
|
||||
<field name="temp2" type="float" unit="deg_celsius" format="%.2f"/>
|
||||
<field name="temp3" type="float" unit="deg_celsius" format="%.2f"/>
|
||||
</message>
|
||||
|
||||
<message name="GUIDANCE_H_REF_INT" id="149">
|
||||
<field name="sp_x" type="int32" alt_unit="m" alt_unit_coef="0.0039063"/>
|
||||
@@ -1937,8 +1944,21 @@
|
||||
<field name="diff" type="float"/>
|
||||
</message>
|
||||
|
||||
<!--222 is free -->
|
||||
<!--223 is free -->
|
||||
<message name="AIR_DATA" id="222">
|
||||
<field name="pressure" type="float" unit="Pa"/>
|
||||
<field name="diff_p" type="float" unit="Pa"/>
|
||||
<field name="temp" type="float" unit="deg celcius"/>
|
||||
<field name="qnh" type="float" unit="hPa"/>
|
||||
<field name="amsl_baro" type="float" unit="m"/>
|
||||
<field name="airspeed" type="float" unit="m/s"/>
|
||||
<field name="tas_factor" type="float"/>
|
||||
</message>
|
||||
|
||||
<message name="AMSL" id="223">
|
||||
<field name="AMSL_BARO" type="float" unit="ft" alt_unit="m"/>
|
||||
<field name="AMSL_GPS" type="float" unit="ft" alt_unit="m"/>
|
||||
</message>
|
||||
|
||||
<!--224 is free -->
|
||||
|
||||
<message name="VIDEO_SYNC" id="225">
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="agl_dist" dir="sonar">
|
||||
<doc>
|
||||
<description>
|
||||
Get sonar values from ABI and store last and filtered values
|
||||
|
||||
Output values are stored in global variables that can be used in flight plans
|
||||
</description>
|
||||
<section name="AGL" prefix="AGL_DIST_SONAR_">
|
||||
<define name="ID" value="ABI_BROADCAST" description="Sonar ABI ID"/>
|
||||
<define name="MAX_RANGE" value="5." description="Max detection range in meters"/>
|
||||
<define name="MIN_RANGE" value="0.001" description="Min detection range in meters"/>
|
||||
<define name="FILTER" value="5" description="First order filter constante"/>
|
||||
</section>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="agl_dist.h"/>
|
||||
</header>
|
||||
<init fun="agl_dist_init()"/>
|
||||
<makefile>
|
||||
<file name="agl_dist.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="air_data">
|
||||
<doc>
|
||||
<description>
|
||||
AirData interface.
|
||||
Provides an interface for baro absolute and differential pressure as well as airspeed.
|
||||
Subscribes to BARO_ABS, BARO_DIFF and TEMPERATURE ABI messages and calculates QNH and true airspeed from it.
|
||||
Also enables you to fly on "flight levels" using AMSL (AltitudeAboveSeaLevel) calculated from current pressure and QNH.
|
||||
|
||||
When using this module to provide airspeed you need a differential pressure sensor module publishing the BARO_DIFF ABI message. Make sure to disable other modules which otherwise directly set the airspeed in the state interface. E.g. when using the airspeed_ms45xx.xml module, define USE_AIRSPEED_MS45XX to FALSE.
|
||||
</description>
|
||||
<define name="AIR_DATA_BARO_ABS_ID" value="ABI_SENDER_ID" description="ABI sender id for absolute baro measurement (default: ABI_BROADCAST)"/>
|
||||
<define name="AIR_DATA_BARO_DIFF_ID" value="ABI_SENDER_ID" description="ABI sender id for differential baro measurement (default: ABI_BROADCAST)"/>
|
||||
<define name="AIR_DATA_TEMPERATURE_ID" value="ABI_SENDER_ID" description="ABI sender id for temperature measurement (default: ABI_BROADCAST)"/>
|
||||
<define name="AIR_DATA_CALC_AIRSPEED" value="FALSE|TRUE" description="Calculate Airspeed from differential pressure (default: TRUE)"/>
|
||||
<define name="AIR_DATA_CALC_TAS_FACTOR" value="FALSE|TRUE" description="Calculate TAS factor from temp and pressure (default: TRUE)"/>
|
||||
<define name="AIR_DATA_CALC_AMSL_BARO" value="FALSE|TRUE" description="Calculate AMS from baro and QNH (default: FALSE)"/>
|
||||
<define name="USE_AIRSPEED_AIR_DATA" value="TRUE|FALSE" description="set airspeed in state interface (defaults to TRUE if USE_AIRSPEED)"/>
|
||||
</doc>
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings name="air_data">
|
||||
<dl_setting min="800" max="1200" step="1" module="air_data/air_data" var="air_data.qnh" shortname="QNH"/>
|
||||
<dl_setting min="0.8" max="1.3" step="0.01" module="air_data/air_data" var="air_data.tas_factor" shortname="TASfactor" param="AIR_DATA_TAS_FACTOR"/>
|
||||
<dl_setting min="0" max="1" step="1" var="air_data.calc_qnh_once" module="air_data/air_data" shortname="calcQNH"/>
|
||||
<dl_setting min="0" max="1" step="1" var="air_data.calc_airspeed" module="air_data/air_data" shortname="calcAirspeed" param="AIR_DATA_CALC_AIRSPEED"/>
|
||||
<dl_setting min="0" max="1" step="1" var="air_data.calc_tas_factor" module="air_data/air_data" shortname="calcTASfactor" param="AIR_DATA_CALC_TAS_FACTOR"/>
|
||||
<dl_setting min="0" max="1" step="1" var="air_data.calc_amsl_baro" module="air_data/air_data" shortname="calcAMSL" param="AIR_DATA_CALC_AMSL_BARO"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
<header>
|
||||
<file name="air_data.h"/>
|
||||
</header>
|
||||
<init fun="air_data_init()"/>
|
||||
<periodic fun="air_data_periodic()" freq="10"/>
|
||||
<makefile>
|
||||
<file name="air_data.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -2,13 +2,23 @@
|
||||
|
||||
<module name="airspeed_adc" dir="sensors">
|
||||
<doc>
|
||||
<description>Airspeed sensor (ADC). Using the internal ADC.</description>
|
||||
<description>Airspeed sensor (ADC).
|
||||
Using the internal ADC.
|
||||
</description>
|
||||
<configure name="ADC_AIRSPEED" value="ADCX" description="ADC on which sensor is connected"/>
|
||||
<define name="AIRSPEED_SCALE" value="scale factor" description="linear scale factor (used if AIRSPEED_QUADRATIC_SCALE is not defined"/>
|
||||
<define name="AIRSPEED_QUADRATIC_SCALE" value="quadratic scale factor" description="it is recommended to use quadratic scale"/>
|
||||
<define name="AIRSPEED_BIAS" value="sensor bias" description="offset on ADC"/>
|
||||
<define name="AIRSPEED_ADC_SCALE" value="scale factor" description="linear scale factor (used if AIRSPEED_QUADRATIC_SCALE is not defined"/>
|
||||
<define name="AIRSPEED_ADC_QUADRATIC_SCALE" value="quadratic scale factor" description="it is recommended to use quadratic scale"/>
|
||||
<define name="AIRSPEED_ADC_BIAS" value="sensor bias" description="offset on ADC"/>
|
||||
<define name="USE_AIRSPEED_ADC" value="TRUE|FALSE" description="set airspeed in state interface (default:TRUE)"/>
|
||||
</doc>
|
||||
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings name="airsp">
|
||||
<dl_setting max="4095" min="0" step="1" module="sensors/airspeed_adc" var="airspeed_adc.offset" shortname="air_bias"/>
|
||||
<dl_setting max="3" min="0" step="0.001" module="sensors/airspeed_adc" var="airspeed_adc.scale" shortname="air_scale"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
<header>
|
||||
<file name="airspeed_adc.h"/>
|
||||
</header>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<define name="AIRSPEED_AMSYS_MAXPRESURE" value="2068" description="max sensor pressure (Pa) (default: 2068 for -003)(for -001 use 689)"/>
|
||||
<define name="AIRSPEED_AMSYS_SCALE" value="1.0" description="sensor scale factor (default: 1.0)"/>
|
||||
<define name="AIRSPEED_AMSYS_FILTER" value="0." description="sensor filter (default: 0. max:1)"/>
|
||||
<define name="USE_AIRSPEED" description="flag to use the data for airspeed control"/>
|
||||
<define name="AIRSPEED_AMSYS_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
||||
<define name="USE_AIRSPEED_AMSYS" value="TRUE|FALSE" description="set airspeed in state interface"/>
|
||||
</doc>
|
||||
<settings>
|
||||
<dl_settings>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<define name="AIRSPEED_ETS_OFFSET" value="offset" description="sensor reading offset (default: 0)"/>
|
||||
<define name="AIRSPEED_ETS_SCALE" value="scale" description="sensor scale factor (default: 1.8)"/>
|
||||
<define name="AIRSPEED_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
|
||||
<define name="USE_AIRSPEED" description="flag to use the data for airspeed control"/>
|
||||
<define name="AIRSPEED_ETS_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
||||
<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" description="set airspeed in state interface"/>
|
||||
</doc>
|
||||
|
||||
<header>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="airspeed_ms45xx_i2c" dir="sensors">
|
||||
<doc>
|
||||
<description>
|
||||
MS45XX differential pressure/airspeed sensor.
|
||||
Airspeed sensor module using the MS45xxDO digital pressure sensor via I2C.
|
||||
Needs one of the differential versions with 14bit pressure and 11bit temperature.
|
||||
</description>
|
||||
<define name="MS45XX_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c2)"/>
|
||||
<define name="MS45XX_I2C_ADDR" value="0x50" description="i2c slave address (default: 0x50)"/>
|
||||
<define name="MS45XX_PRESSURE_RANGE" value="1|2|5|15|30|50|100|150" description="pressure range in psi (default: 1)"/>
|
||||
<define name="MS45XX_OUTPUT_TYPE" value="0|1" description="set to 0 for output type A, to 1 for output type B (default: type A)"/>
|
||||
<define name="MS45XX_SYNC_SEND" value="TRUE|FALSE" description="flag to enable sending every new measurement via telemetry (default:FALSE)"/>
|
||||
<define name="MS45XX_PRESSURE_SCALE" value="1.05" description="pressure scaling factor to convert raw output to Pa (default: set according to pressure range and output type according to datasheet)"/>
|
||||
<define name="MS45XX_PRESSURE_OFFSET" value="8618.4" description="pressure offset in Pa (default: set according to pressure range and output type according to datasheet)"/>
|
||||
<define name="MS45XX_AIRSPEED_SCALE" value="1.6327" description="quadratic scale factor to convert differential pressure to airspeed"/>
|
||||
<define name="MS45XX_LOWPASS_TAU" value="0.15" description="Time constant for second order Butterworth low pass filter"/>
|
||||
<define name="USE_AIRSPEED_MS45XX" value="TRUE|FALSE" description="set airspeed in state interface"/>
|
||||
</doc>
|
||||
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings NAME="MS45XX">
|
||||
<dl_setting min="0" max="1" step="1" values="FALSE|TRUE" var="ms45xx.sync_send" type="bool" shortname="sync_send" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_SYNC_SEND" persistent="true"/>
|
||||
<dl_setting min="0.9" max="1.2" step="0.01" var="ms45xx.pressure_scale" type="float" shortname="PressScale" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_PRESSURE_SCALE" persistent="true"/>
|
||||
<dl_setting min="8300.0" max="8900.0" step="0.1" var="ms45xx.pressure_offset" type="float" shortname="PressScale" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_PRESSURE_OFFSET" persistent="true"/>
|
||||
<dl_setting min="1.0" max="2.0" step="0.01" var="ms45xx.airspeed_scale" type="float" shortname="AirScale" module="modules/sensors/airspeed_ms45xx_i2c" param="MS45XX_AIRSPEED_SCALE" persistent="true"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
|
||||
<header>
|
||||
<file name="airspeed_ms45xx_i2c.h"/>
|
||||
</header>
|
||||
|
||||
<init fun="ms45xx_i2c_init()"/>
|
||||
<periodic fun="ms45xx_i2c_periodic()" freq="100."/>
|
||||
<event fun="ms45xx_i2c_event()"/>
|
||||
|
||||
<makefile target="ap">
|
||||
<file name="airspeed_ms45xx_i2c.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
<module name="uart_cam_ctrl" dir="digital_cam">
|
||||
<doc>
|
||||
<description>
|
||||
Digital Camera Triggering over UART link.
|
||||
Send attitude and other relevant data to a computer based photocamera after a shootphoto command is given. And in return get certain value back from the computerbased photocamera to be able to intercat with the flightplan.</description>
|
||||
<define name="DC_AUTOSHOOT_QUARTERSEC_PERIOD" value="6" description="quarter_second"/>
|
||||
<define name="DC_AUTOSHOOT_METER_GRID" value="50" description="grid in meters"/>
|
||||
</doc>
|
||||
<settings>
|
||||
<dl_settings name="control">
|
||||
<dl_settings name="tb">
|
||||
<dl_setting max="2" min="0" step="1" var="ticket_thumbnails" shortname="thumbs">
|
||||
<strip_button name="DL Thumbs High" icon="on.png" value="2" group="ticket"/>
|
||||
<strip_button name="DL Thumbs Low" icon="on.png" value="1" group="ticket"/>
|
||||
<strip_button name="DL Thumbs STOP" icon="off.png" value="0" group="ticket"/>
|
||||
</dl_setting>
|
||||
<dl_setting max="2" min="0" step="1" var="ticket_status" shortname="status" />
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
<header>
|
||||
<file name="uart_cam_ctrl.h"/>
|
||||
</header>
|
||||
<init fun="digital_cam_uart_init()"/>
|
||||
<periodic fun="digital_cam_uart_periodic()" freq="4" autorun="TRUE"/>
|
||||
<event fun="digital_cam_uart_event()"/>
|
||||
<makefile target="sim">
|
||||
<file name="catia/serial.c"/>
|
||||
</makefile>
|
||||
<makefile>
|
||||
<define name="DIGITAL_CAM" />
|
||||
<file name="uart_cam_ctrl.c"/>
|
||||
<file name="catia/protocol.c"/>
|
||||
<file name="dc.c"/>
|
||||
<define name="SENSOR_SYNC_SEND" value="1"/>
|
||||
<raw>
|
||||
$(TARGET).CFLAGS += -DCAMERA_LINK=$(CAMERA_PORT)
|
||||
$(TARGET).CFLAGS += -DUSE_$(CAMERA_PORT)
|
||||
$(TARGET).CFLAGS += -D$(CAMERA_PORT)_BAUD=B115200
|
||||
</raw>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user