mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 05:17:03 +08:00
sim builds with all supported IMUs
This commit is contained in:
@@ -16,6 +16,12 @@
|
|||||||
<axis name="THRUST" failsafe_value="0"/>
|
<axis name="THRUST" failsafe_value="0"/>
|
||||||
</commands>
|
</commands>
|
||||||
|
|
||||||
|
<!-- for the sim -->
|
||||||
|
<section name="ACTUATORS_MKK" prefix="ACTUATORS_MKK_">
|
||||||
|
<define name="NB" value="4"/>
|
||||||
|
<define name="ADDR" value="{ 0x52, 0x54, 0x56, 0x58 }"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section name="SUPERVISION" prefix="SUPERVISION_">
|
<section name="SUPERVISION" prefix="SUPERVISION_">
|
||||||
<define name="MIN_MOTOR" value="3"/>
|
<define name="MIN_MOTOR" value="3"/>
|
||||||
@@ -64,8 +70,8 @@
|
|||||||
|
|
||||||
<section name="AUTOPILOT">
|
<section name="AUTOPILOT">
|
||||||
<define name="BOOZ2_MODE_MANUAL" value="BOOZ2_AP_MODE_ATTITUDE_DIRECT"/>
|
<define name="BOOZ2_MODE_MANUAL" value="BOOZ2_AP_MODE_ATTITUDE_DIRECT"/>
|
||||||
<define name="BOOZ2_MODE_AUTO1" value="BOOZ2_AP_MODE_ATTITUDE_DIRECT"/>
|
<define name="BOOZ2_MODE_AUTO1" value="BOOZ2_AP_MODE_ATTITUDE_RC_CLIMB"/>
|
||||||
<define name="BOOZ2_MODE_AUTO2" value="BOOZ2_AP_MODE_ATTITUDE_DIRECT"/>
|
<define name="BOOZ2_MODE_AUTO2" value="BOOZ2_AP_MODE_ATTITUDE_Z_HOLD"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="BAT">
|
<section name="BAT">
|
||||||
@@ -132,7 +138,8 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="INS" prefix="BOOZ_INS_">
|
<section name="INS" prefix="BOOZ_INS_">
|
||||||
<define name="BARO_SENS" value="15." integer="16"/>
|
<!-- <define name="BARO_SENS" value="15." integer="16"/> -->
|
||||||
|
<define name="BARO_SENS" value="10." integer="16"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section name="GUIDANCE_V" prefix="BOOZ2_GUIDANCE_V_">
|
<section name="GUIDANCE_V" prefix="BOOZ2_GUIDANCE_V_">
|
||||||
@@ -162,17 +169,33 @@
|
|||||||
<define name="BOOZ2_FACE_REINJ_1" value="1024"/>
|
<define name="BOOZ2_FACE_REINJ_1" value="1024"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section name="SIMULATOR" prefix="NPS_">
|
||||||
|
<define name="ACTUATOR_NAMES" value="{"front_motor", "back_motor", "right_motor", "left_motor"}"/>
|
||||||
|
<define name="INITIAL_CONDITITONS" value=""reset00""/>
|
||||||
|
<define name="SENSORS_PARAMS" value=""nps_sensors_params_booz2_a1.h""/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
<modules main_freq="512">
|
<modules main_freq="512">
|
||||||
<load name="vehicle_interface_datalink.xml"/>
|
<load name="vehicle_interface_datalink.xml"/>
|
||||||
</modules>
|
</modules>
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
<firmware name="rotorcraft">
|
<firmware name="rotorcraft">
|
||||||
<target name="ap" board="lisa_l_1.0"/>
|
<target name="ap" board="lisa_l_1.0">
|
||||||
|
<!-- <define name="BOOZ_START_DELAY" value="1"/> -->
|
||||||
<subsystem name="radio_control" type="spektrum">
|
<subsystem name="radio_control" type="spektrum">
|
||||||
<param name="RADIO_CONTROL_SPEKTRUM_MODEL"
|
<param name="RADIO_CONTROL_SPEKTRUM_MODEL"
|
||||||
value="\\\"booz/radio_control/booz_radio_control_spektrum_dx7se.h\\\""/>
|
value="\\\"booz/radio_control/booz_radio_control_spektrum_dx7se.h\\\""/>
|
||||||
</subsystem>
|
</subsystem>
|
||||||
<subsystem name="actuators" type="asctec"/>
|
<subsystem name="actuators" type="asctec"/>
|
||||||
|
</target>
|
||||||
|
<target name="sim" board="pc">
|
||||||
|
<subsystem name="simulator" type="nps"/>
|
||||||
|
<subsystem name="radio_control" type="ppm"/>
|
||||||
|
<subsystem name="actuators" type="mkk"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
<subsystem name="imu" type="b2_v1.1"/>
|
<subsystem name="imu" type="b2_v1.1"/>
|
||||||
<subsystem name="gps" type="ublox"/>
|
<subsystem name="gps" type="ublox"/>
|
||||||
<subsystem name="ahrs" type="cmpl"/>
|
<subsystem name="ahrs" type="cmpl"/>
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ ap.CFLAGS += -DUSE_I2C1 -DI2C1_SCLL=150 -DI2C1_SCLH=150 -DI2C1_VIC_SLOT=11 -DI2
|
|||||||
#
|
#
|
||||||
|
|
||||||
sim.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
|
sim.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
|
||||||
|
sim.CFLAGS += -DIMU_B2_VERSION_1_0
|
||||||
sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
|
sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
|
||||||
sim.srcs += $(SRC_BOOZ)/booz_imu.c \
|
sim.srcs += $(SRC_BOOZ)/booz_imu.c \
|
||||||
$(SRC_BOOZ)/imu/booz_imu_b2.c \
|
$(SRC_BOOZ)/imu/booz_imu_b2.c \
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ endif
|
|||||||
#
|
#
|
||||||
|
|
||||||
sim.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
|
sim.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\"
|
||||||
|
sim.CFLAGS += -DIMU_B2_VERSION_1_1
|
||||||
sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
|
sim.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_AMI601
|
||||||
sim.srcs += $(SRC_BOOZ)/booz_imu.c \
|
sim.srcs += $(SRC_BOOZ)/booz_imu.c \
|
||||||
$(SRC_BOOZ)/imu/booz_imu_b2.c \
|
$(SRC_BOOZ)/imu/booz_imu_b2.c \
|
||||||
|
|||||||
@@ -14,6 +14,11 @@
|
|||||||
#define ACTUATORS_ASCTEC_DEVICE i2c0
|
#define ACTUATORS_ASCTEC_DEVICE i2c0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Macros to generate i2cx_buf and i2cx_transmit from
|
||||||
|
* ACTUATORS_ASCTEC_DEVICE
|
||||||
|
*
|
||||||
|
*/
|
||||||
#define __Device(dev, _z) dev##_##_z
|
#define __Device(dev, _z) dev##_##_z
|
||||||
#define _Device(dev, _z) __Device(dev, _z)
|
#define _Device(dev, _z) __Device(dev, _z)
|
||||||
#define Device( _z) _Device(ACTUATORS_ASCTEC_DEVICE, _z)
|
#define Device( _z) _Device(ACTUATORS_ASCTEC_DEVICE, _z)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ STATIC_INLINE void booz2_main_init( void ) {
|
|||||||
|
|
||||||
#ifndef RADIO_CONTROL_LINK
|
#ifndef RADIO_CONTROL_LINK
|
||||||
/* read the comment below the bind function needs to start as close to powerup as possible
|
/* read the comment below the bind function needs to start as close to powerup as possible
|
||||||
it also blocks for 73ms which is longer than this loop could thhis be moved elsewhere */
|
it also blocks for 73ms which is longer than this loop could this be moved elsewhere */
|
||||||
for (uint32_t startup_counter=0; startup_counter<2000000; startup_counter++){
|
for (uint32_t startup_counter=0; startup_counter<2000000; startup_counter++){
|
||||||
__asm("nop");
|
__asm("nop");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user