diff --git a/conf/airframes/Poine/beth.xml b/conf/airframes/Poine/beth.xml index b2e122f2f0..ffb3ff94cc 100644 --- a/conf/airframes/Poine/beth.xml +++ b/conf/airframes/Poine/beth.xml @@ -97,9 +97,11 @@ main_stm32.srcs += $(SRC_ARCH)/uart_hw.c main_stm32.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2 main_stm32.srcs += downlink.c pprz_transport.c -#main_stm32.CFLAGS += -DUSE_OVERO_LINK -DOVERO_LINK_MSG_UNION=AutopilotMessageBeth -#main_stm32.CFLAGS += -DOVERO_LINK_LED_OK=5 -DOVERO_LINK_LED_KO=4 -DUSE_DMA1_C2_IRQ -#main_stm32.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c + +main_stm32.CFLAGS += -DUSE_OVERO_LINK +main_stm32.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown +main_stm32.CFLAGS += -DOVERO_LINK_LED_OK=5 -DOVERO_LINK_LED_KO=4 -DUSE_DMA1_C2_IRQ +main_stm32.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c main_stm32.CFLAGS += -DBOOZ_IMU_TYPE_H=\"imu/booz_imu_b2.h\" main_stm32.CFLAGS += -DIMU_B2_MAG_TYPE=IMU_B2_MAG_MS2001 diff --git a/sw/airborne/beth/main_stm32.c b/sw/airborne/beth/main_stm32.c index 30fe13d6c8..2448b78ede 100644 --- a/sw/airborne/beth/main_stm32.c +++ b/sw/airborne/beth/main_stm32.c @@ -31,7 +31,7 @@ #include "booz/booz_actuators.h" //#include "booz/booz_radio_control.h" #include "booz/booz_imu.h" -//#include "lisa/lisa_overo_link.h" +#include "lisa/lisa_overo_link.h" //#include "beth/bench_sensors.h" static inline void main_init( void ); @@ -71,7 +71,7 @@ static inline void main_init( void ) { //actuators_init(); //radio_control_init(); //booz_imu_init(); - //overo_link_init(); + overo_link_init(); //bench_sensors_init(); can_init(); } @@ -80,7 +80,7 @@ static inline void main_init( void ) { static inline void main_periodic( void ) { //booz_imu_periodic(); //actuators_set(FALSE); - //OveroLinkPeriodic(main_on_overo_link_lost) + OveroLinkPeriodic(main_on_overo_link_lost) RunOnceEvery(10, {LED_PERIODIC(); DOWNLINK_SEND_ALIVE(DefaultChannel, 16, MD5SUM);}); #ifdef BETH_HACK @@ -102,17 +102,17 @@ static inline void main_event( void ) { } static inline void main_on_overo_msg_received(void) { -/* struct AutopilotMessageBethUp* msg_out = (struct AutopilotMessageBethUp*)overo_link.msg_out; - msg_out->gyro.x = booz_imu.gyro.p; - msg_out->gyro.y = booz_imu.gyro.q; + // struct AutopilotMessageBethUp* msg_out = (struct AutopilotMessageBethUp*)overo_link.msg_out; + overo_link.up.msg.gyro.x = booz_imu.gyro.p; + /* msg_out->gyro.y = booz_imu.gyro.q; msg_out->gyro.z = booz_imu.gyro.r; msg_out->accel.x = booz_imu.accel.x; msg_out->accel.y = booz_imu.accel.y; msg_out->accel.z = booz_imu.accel.z; msg_out->bench_sensor.x = my_cnt; msg_out->bench_sensor.y = my_cnt; - msg_out->bench_sensor.z = my_cnt; - my_cnt++;*/ + msg_out->bench_sensor.z = my_cnt; */ + my_cnt++; } static inline void main_on_overo_link_lost(void) {