mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[test] update bbb and test_imu
This commit is contained in:
@@ -5,17 +5,11 @@
|
||||
<airframe name="test_bbb">
|
||||
|
||||
<firmware name="test_progs">
|
||||
<target name="test_settings" board="beagle_bone_black">
|
||||
<!-- use UDP telemetry -->
|
||||
<configure name="MODEM_DEV" value="UDP0"/>
|
||||
<configure name="MODEM_HOST" value="192.168.178.255"/>
|
||||
</target>
|
||||
<target name="test_uart_echo" board="beagle_bone_black">
|
||||
<define name="USE_UART4"/>
|
||||
<define name="UART4_BAUD" value="B9600"/>
|
||||
<configure name="PERIODIC_FREQUENCY" value="5"/>
|
||||
</target>
|
||||
<target name="test_telemetry" board="beagle_bone_black"/>
|
||||
<target name="test_uart_send" board="beagle_bone_black">
|
||||
<define name="USE_UART2"/>
|
||||
<define name="UART2_BAUD" value="B9600"/>
|
||||
@@ -27,10 +21,23 @@
|
||||
<configure name="PERIODIC_FREQUENCY" value="10"/>
|
||||
</target>
|
||||
|
||||
<target name="test_settings" board="beagle_bone_black"/>
|
||||
<target name="test_telemetry" board="beagle_bone_black"/>
|
||||
<target name="test_imu" board="beagle_bone_black">
|
||||
<subsystem name="imu" type="mpu60x0_i2c">
|
||||
<configure name="IMU_MPU60X0_I2C_DEV" value="i2c1"/>
|
||||
</subsystem>
|
||||
<configure name="PERIODIC_FREQUENCY" value="60"/>
|
||||
</target>
|
||||
|
||||
<!-- use UDP telemetry via usb-gadget with netmask 255.255.255.252 -->
|
||||
<configure name="MODEM_DEV" value="UDP0"/>
|
||||
<configure name="MODEM_HOST" value="192.168.7.3"/>
|
||||
|
||||
<configure name="DEBUG_INFO" value="yes"/>
|
||||
<configure name="OPT" value="0"/>
|
||||
<!-- upload to USER@HOST -->
|
||||
<configure name="HOST" value="192.168.178.183"/>
|
||||
<configure name="HOST" value="192.168.7.2"/>
|
||||
<configure name="USER" value="ubuntu"/>
|
||||
</firmware>
|
||||
|
||||
|
||||
@@ -413,6 +413,7 @@ test_imu.srcs += $(COMMON_TEST_SRCS)
|
||||
test_imu.CFLAGS += $(COMMON_TELEMETRY_CFLAGS)
|
||||
test_imu.srcs += $(COMMON_TELEMETRY_SRCS)
|
||||
test_imu.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
|
||||
test_imu.srcs += state.c
|
||||
test_imu.srcs += test/subsystems/test_imu.c
|
||||
test_imu.srcs += math/pprz_geodetic_int.c math/pprz_geodetic_float.c math/pprz_geodetic_double.c math/pprz_trig_int.c math/pprz_orientation_conversion.c math/pprz_algebra_int.c math/pprz_algebra_float.c math/pprz_algebra_double.c
|
||||
|
||||
|
||||
@@ -98,6 +98,34 @@ static inline void main_periodic_task(void)
|
||||
led_toggle();
|
||||
DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);
|
||||
});
|
||||
|
||||
#if USE_I2C1
|
||||
RunOnceEvery(111, {
|
||||
uint16_t i2c1_queue_full_cnt = i2c1.errors->queue_full_cnt;
|
||||
uint16_t i2c1_ack_fail_cnt = i2c1.errors->ack_fail_cnt;
|
||||
uint16_t i2c1_miss_start_stop_cnt = i2c1.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c1_arb_lost_cnt = i2c1.errors->arb_lost_cnt;
|
||||
uint16_t i2c1_over_under_cnt = i2c1.errors->over_under_cnt;
|
||||
uint16_t i2c1_pec_recep_cnt = i2c1.errors->pec_recep_cnt;
|
||||
uint16_t i2c1_timeout_tlow_cnt = i2c1.errors->timeout_tlow_cnt;
|
||||
uint16_t i2c1_smbus_alert_cnt = i2c1.errors->smbus_alert_cnt;
|
||||
uint16_t i2c1_unexpected_event_cnt = i2c1.errors->unexpected_event_cnt;
|
||||
uint32_t i2c1_last_unexpected_event = i2c1.errors->last_unexpected_event;
|
||||
uint8_t _bus1 = 1;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c1_queue_full_cnt,
|
||||
&i2c1_ack_fail_cnt,
|
||||
&i2c1_miss_start_stop_cnt,
|
||||
&i2c1_arb_lost_cnt,
|
||||
&i2c1_over_under_cnt,
|
||||
&i2c1_pec_recep_cnt,
|
||||
&i2c1_timeout_tlow_cnt,
|
||||
&i2c1_smbus_alert_cnt,
|
||||
&i2c1_unexpected_event_cnt,
|
||||
&i2c1_last_unexpected_event,
|
||||
&_bus1);
|
||||
});
|
||||
#endif
|
||||
#if USE_I2C2
|
||||
RunOnceEvery(111, {
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
@@ -110,7 +138,7 @@ static inline void main_periodic_task(void)
|
||||
uint16_t i2c2_smbus_alert_cnt = i2c2.errors->smbus_alert_cnt;
|
||||
uint16_t i2c2_unexpected_event_cnt = i2c2.errors->unexpected_event_cnt;
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
@@ -125,6 +153,7 @@ static inline void main_periodic_task(void)
|
||||
&_bus2);
|
||||
});
|
||||
#endif
|
||||
|
||||
if (sys_time.nb_sec > 1) { imu_periodic(); }
|
||||
RunOnceEvery(10, { LED_PERIODIC();});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user