[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5582] moved booz/booz2_main.c to firmwares/rotorcra
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5582] moved booz/booz2_main.c to firmwares/rotorcraft/main.c |
Date: |
Sun, 22 Aug 2010 20:45:21 +0000 |
Revision: 5582
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5582
Author: poine
Date: 2010-08-22 20:45:21 +0000 (Sun, 22 Aug 2010)
Log Message:
-----------
moved booz/booz2_main.c to firmwares/rotorcraft/main.c
Modified Paths:
--------------
paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
paparazzi3/trunk/conf/boards/booz_1.0.makefile
paparazzi3/trunk/sw/airborne/boards/booz/baro_board.c
paparazzi3/trunk/sw/airborne/boards/booz/baro_board.h
paparazzi3/trunk/sw/airborne/boards/booz/test_baro.c
paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.c
paparazzi3/trunk/sw/airborne/boards/lisa_l/test_baro.c
paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
paparazzi3/trunk/sw/airborne/booz/booz2_ins.c
Added Paths:
-----------
paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c
paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.h
Removed Paths:
-------------
paparazzi3/trunk/sw/airborne/booz/booz2_main.c
paparazzi3/trunk/sw/airborne/booz/booz2_main.h
Modified: paparazzi3/trunk/conf/autopilot/rotorcraft.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-08-22 20:31:37 UTC
(rev 5581)
+++ paparazzi3/trunk/conf/autopilot/rotorcraft.makefile 2010-08-22 20:45:21 UTC
(rev 5582)
@@ -35,6 +35,7 @@
SRC_BOOZ_ARCH=$(SRC_BOOZ)/arch/$(ARCH)
SRC_BOOZ_TEST=$(SRC_BOOZ)/test
SRC_BOARD=boards/$(BOARD)
+SRC_FIRMAWRE=firmwares/rotorcraft
SRC_BOOZ_PRIV=booz_priv
@@ -52,7 +53,7 @@
ap.CFLAGS += $(BOOZ_INC)
ap.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -DPERIPHERALS_AUTO_INIT
-ap.srcs = $(SRC_BOOZ)/booz2_main.c
+ap.srcs = $(SRC_FIRMAWRE)/main.c
ifeq ($(ARCHI), stm32)
ap.srcs += lisa/plug_sys.c
Modified: paparazzi3/trunk/conf/boards/booz_1.0.makefile
===================================================================
--- paparazzi3/trunk/conf/boards/booz_1.0.makefile 2010-08-22 20:31:37 UTC
(rev 5581)
+++ paparazzi3/trunk/conf/boards/booz_1.0.makefile 2010-08-22 20:45:21 UTC
(rev 5582)
@@ -19,7 +19,7 @@
#
#
-#SYS_TIME_LED = 1 # not used
+SYS_TIME_LED = 1 # not used on rotorcraft, only for tests
RADIO_CONTROL_LED = 1
RADIO_CONTROL_LINK = UART0
Modified: paparazzi3/trunk/sw/airborne/boards/booz/baro_board.c
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/booz/baro_board.c 2010-08-22
20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/boards/booz/baro_board.c 2010-08-22
20:45:21 UTC (rev 5582)
@@ -21,7 +21,7 @@
*/
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
#include "airframe.h"
#include "led.h"
Modified: paparazzi3/trunk/sw/airborne/boards/booz/baro_board.h
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/booz/baro_board.h 2010-08-22
20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/boards/booz/baro_board.h 2010-08-22
20:45:21 UTC (rev 5582)
@@ -3,7 +3,7 @@
#include "std.h"
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
#include "booz/booz2_analog.h"
/* we don't need that on this board */
Modified: paparazzi3/trunk/sw/airborne/boards/booz/test_baro.c
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/booz/test_baro.c 2010-08-22
20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/boards/booz/test_baro.c 2010-08-22
20:45:21 UTC (rev 5582)
@@ -34,7 +34,7 @@
#include "sys_time.h"
#include "downlink.h"
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
static inline void main_init( void );
static inline void main_periodic_task( void );
Modified: paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.c
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.c 2010-08-22
20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/boards/lisa_l/baro_board.c 2010-08-22
20:45:21 UTC (rev 5582)
@@ -1,5 +1,5 @@
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
struct Baro baro;
struct BaroBoard baro_board;
Modified: paparazzi3/trunk/sw/airborne/boards/lisa_l/test_baro.c
===================================================================
--- paparazzi3/trunk/sw/airborne/boards/lisa_l/test_baro.c 2010-08-22
20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/boards/lisa_l/test_baro.c 2010-08-22
20:45:21 UTC (rev 5582)
@@ -34,7 +34,7 @@
#include "downlink.h"
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
//#include "my_debug_servo.h"
static inline void main_init( void );
Modified: paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
2010-08-22 20:31:37 UTC (rev 5581)
+++ paparazzi3/trunk/sw/airborne/booz/arch/lpc21/booz2_analog_hw.c
2010-08-22 20:45:21 UTC (rev 5582)
@@ -24,7 +24,7 @@
#include "booz2_analog.h"
/* analog_arch includes baro ??? naaaa we don't want double references */
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
#include "booz2_battery.h"
#ifndef USE_EXTRA_ADC
Modified: paparazzi3/trunk/sw/airborne/booz/booz2_ins.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_ins.c 2010-08-22 20:31:37 UTC
(rev 5581)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_ins.c 2010-08-22 20:45:21 UTC
(rev 5582)
@@ -25,7 +25,7 @@
#include "booz2_ins.h"
#include "booz_imu.h"
-#include "rotorcraft/baro.h"
+#include "firmwares/rotorcraft/baro.h"
#include "booz_gps.h"
#include "airframe.h"
Deleted: paparazzi3/trunk/sw/airborne/booz/booz2_main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_main.c 2010-08-22 20:31:37 UTC
(rev 5581)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_main.c 2010-08-22 20:45:21 UTC
(rev 5582)
@@ -1,263 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2010 The Paparazzi Team
- *
- * This file is part of Paparazzi.
- *
- * Paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#define MODULES_C
-
-#include <inttypes.h>
-#include "init_hw.h"
-#include "sys_time.h"
-#include "led.h"
-#include "interrupt_hw.h"
-
-#include "downlink.h"
-#include "booz2_telemetry.h"
-#include "datalink.h"
-
-#include "booz2_commands.h"
-#include "booz_actuators.h"
-#include "booz_radio_control.h"
-
-#include "booz_imu.h"
-#include "booz_gps.h"
-
-#include "booz/booz2_analog.h"
-#include "rotorcraft/baro.h"
-
-#include "booz2_battery.h"
-
-#include "booz_fms.h"
-#include "booz2_autopilot.h"
-
-#include "booz_stabilization.h"
-#include "booz_guidance.h"
-
-#include "booz_ahrs.h"
-#include "booz2_ins.h"
-
-#if defined USE_CAM || USE_DROP
-#include "booz2_pwm_hw.h"
-#endif
-
-#include "booz2_main.h"
-
-#ifdef SITL
-#include "nps_autopilot_booz.h"
-#endif
-
-#ifdef USE_MODULES
-#include "modules.h"
-#endif
-
-static inline void on_gyro_accel_event( void );
-static inline void on_baro_abs_event( void );
-static inline void on_baro_dif_event( void );
-static inline void on_gps_event( void );
-static inline void on_mag_event( void );
-
-#ifndef SITL
-int main( void ) {
- booz2_main_init();
-
- while(1) {
- if (sys_time_periodic())
- booz2_main_periodic();
- booz2_main_event();
- }
- return 0;
-}
-#endif /* SITL */
-
-STATIC_INLINE void booz2_main_init( void ) {
-
-#ifndef RADIO_CONTROL_LINK
- /* 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 */
- for (uint32_t startup_counter=0; startup_counter<2000000; startup_counter++){
- __asm("nop");
- }
-#endif
-
- hw_init();
-
- sys_time_init();
-
- actuators_init();
- radio_control_init();
-
- booz2_analog_init();
- baro_init();
-
-#if defined USE_CAM || USE_DROP
- booz2_pwm_init_hw();
-#endif
-
- booz2_battery_init();
- booz_imu_init();
-
- booz_fms_init();
- booz2_autopilot_init();
- booz2_nav_init();
- booz2_guidance_h_init();
- booz2_guidance_v_init();
- booz_stabilization_init();
-
- booz_ahrs_aligner_init();
- booz_ahrs_init();
-
- booz_ins_init();
-
-#ifdef USE_GPS
- booz_gps_init();
-#endif
-
-#ifdef USE_MODULES
- modules_init();
-#endif
-
- int_enable();
-
-}
-
-
-STATIC_INLINE void booz2_main_periodic( void ) {
-
- booz_imu_periodic();
-
- /* run control loops */
- booz2_autopilot_periodic();
- /* set actuators */
- actuators_set(booz2_autopilot_motors_on);
-
- PeriodicPrescaleBy10(
\
- { \
- radio_control_periodic();
\
- if (radio_control.status != RADIO_CONTROL_OK && \
- booz2_autopilot_mode != BOOZ2_AP_MODE_KILL &&
\
- booz2_autopilot_mode != BOOZ2_AP_MODE_NAV) \
- booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
- }, \
- { \
- booz_fms_periodic(); \
- }, \
- { \
- /*BoozControlSurfacesSetFromCommands();*/
\
- }, \
- { \
- LED_PERIODIC(); \
- }, \
- { baro_periodic();
- }, \
- {},
\
- {},
\
- {},
\
- {},
\
- { \
- Booz2TelemetryPeriodic();
\
- } \
- ); \
-
-#ifdef USE_GPS
- if (radio_control.status != RADIO_CONTROL_OK && \
- booz2_autopilot_mode == BOOZ2_AP_MODE_NAV && GpsIsLost())
\
- booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
- booz_gps_periodic();
-#endif
-
-#ifdef USE_EXTRA_ADC
- booz2_analog_periodic();
-#endif
-
-#ifdef USE_MODULES
- modules_periodic_task();
-#endif
-
- if (booz2_autopilot_in_flight) {
- RunOnceEvery(512, { booz2_autopilot_flight_time++; datalink_time++; });
- }
-
-}
-
-STATIC_INLINE void booz2_main_event( void ) {
-
- DatalinkEvent();
-
- if (booz2_autopilot_rc) {
- RadioControlEvent(booz2_autopilot_on_rc_frame);
- }
-
- BoozImuEvent(on_gyro_accel_event, on_mag_event);
-
- BaroEvent(on_baro_abs_event, on_baro_dif_event);
-
-#ifdef USE_GPS
- BoozGpsEvent(on_gps_event);
-#endif
-
-#ifdef BOOZ_FAILSAFE_GROUND_DETECT
- BoozDetectGroundEvent();
-#endif
-
-#ifdef USE_MODULES
- modules_event_task();
-#endif
-
-}
-
-static inline void on_gyro_accel_event( void ) {
-
- BoozImuScaleGyro(booz_imu);
- BoozImuScaleAccel(booz_imu);
-
- if (booz_ahrs.status == BOOZ_AHRS_UNINIT) {
- booz_ahrs_aligner_run();
- if (booz_ahrs_aligner.status == BOOZ_AHRS_ALIGNER_LOCKED)
- booz_ahrs_align();
- }
- else {
- booz_ahrs_propagate();
- booz_ahrs_update_accel();
-#ifdef SITL
- if (nps_bypass_ahrs) sim_overwrite_ahrs();
-#endif
- booz_ins_propagate();
- }
-}
-
-static inline void on_baro_abs_event( void ) {
- booz_ins_update_baro();
-}
-
-static inline void on_baro_dif_event( void ) {
-
-}
-
-static inline void on_gps_event(void) {
- booz_ins_update_gps();
-}
-
-static inline void on_mag_event(void) {
- BoozImuScaleMag(booz_imu);
- if (booz_ahrs.status == BOOZ_AHRS_RUNNING)
- booz_ahrs_update_mag();
-}
Deleted: paparazzi3/trunk/sw/airborne/booz/booz2_main.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_main.h 2010-08-22 20:31:37 UTC
(rev 5581)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_main.h 2010-08-22 20:45:21 UTC
(rev 5582)
@@ -1,37 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef BOOZ2_MAIN_H
-#define BOOZ2_MAIN_H
-
-#ifdef SITL
-#define STATIC_INLINE extern
-#else
-#define STATIC_INLINE static inline
-#endif
-
-STATIC_INLINE void booz2_main_init( void );
-STATIC_INLINE void booz2_main_periodic( void );
-STATIC_INLINE void booz2_main_event( void );
-
-#endif /* BOOZ2_MAIN_H */
Copied: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c (from rev
5579, paparazzi3/trunk/sw/airborne/booz/booz2_main.c)
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c
(rev 0)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.c 2010-08-22
20:45:21 UTC (rev 5582)
@@ -0,0 +1,263 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008-2010 The Paparazzi Team
+ *
+ * This file is part of Paparazzi.
+ *
+ * Paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Paparazzi; see the file COPYING. If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#define MODULES_C
+
+#include <inttypes.h>
+#include "init_hw.h"
+#include "sys_time.h"
+#include "led.h"
+#include "interrupt_hw.h"
+
+#include "downlink.h"
+#include "booz2_telemetry.h"
+#include "datalink.h"
+
+#include "booz2_commands.h"
+#include "booz_actuators.h"
+#include "booz_radio_control.h"
+
+#include "booz_imu.h"
+#include "booz_gps.h"
+
+#include "booz/booz2_analog.h"
+#include "firmwares/rotorcraft/baro.h"
+
+#include "booz2_battery.h"
+
+#include "booz_fms.h"
+#include "booz2_autopilot.h"
+
+#include "booz_stabilization.h"
+#include "booz_guidance.h"
+
+#include "booz_ahrs.h"
+#include "booz2_ins.h"
+
+#if defined USE_CAM || USE_DROP
+#include "booz2_pwm_hw.h"
+#endif
+
+#include "firmwares/rotorcraft/main.h"
+
+#ifdef SITL
+#include "nps_autopilot_booz.h"
+#endif
+
+#ifdef USE_MODULES
+#include "modules.h"
+#endif
+
+static inline void on_gyro_accel_event( void );
+static inline void on_baro_abs_event( void );
+static inline void on_baro_dif_event( void );
+static inline void on_gps_event( void );
+static inline void on_mag_event( void );
+
+#ifndef SITL
+int main( void ) {
+ booz2_main_init();
+
+ while(1) {
+ if (sys_time_periodic())
+ booz2_main_periodic();
+ booz2_main_event();
+ }
+ return 0;
+}
+#endif /* SITL */
+
+STATIC_INLINE void booz2_main_init( void ) {
+
+#ifndef RADIO_CONTROL_LINK
+ /* 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 */
+ for (uint32_t startup_counter=0; startup_counter<2000000; startup_counter++){
+ __asm("nop");
+ }
+#endif
+
+ hw_init();
+
+ sys_time_init();
+
+ actuators_init();
+ radio_control_init();
+
+ booz2_analog_init();
+ baro_init();
+
+#if defined USE_CAM || USE_DROP
+ booz2_pwm_init_hw();
+#endif
+
+ booz2_battery_init();
+ booz_imu_init();
+
+ booz_fms_init();
+ booz2_autopilot_init();
+ booz2_nav_init();
+ booz2_guidance_h_init();
+ booz2_guidance_v_init();
+ booz_stabilization_init();
+
+ booz_ahrs_aligner_init();
+ booz_ahrs_init();
+
+ booz_ins_init();
+
+#ifdef USE_GPS
+ booz_gps_init();
+#endif
+
+#ifdef USE_MODULES
+ modules_init();
+#endif
+
+ int_enable();
+
+}
+
+
+STATIC_INLINE void booz2_main_periodic( void ) {
+
+ booz_imu_periodic();
+
+ /* run control loops */
+ booz2_autopilot_periodic();
+ /* set actuators */
+ actuators_set(booz2_autopilot_motors_on);
+
+ PeriodicPrescaleBy10(
\
+ { \
+ radio_control_periodic();
\
+ if (radio_control.status != RADIO_CONTROL_OK && \
+ booz2_autopilot_mode != BOOZ2_AP_MODE_KILL &&
\
+ booz2_autopilot_mode != BOOZ2_AP_MODE_NAV) \
+ booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
+ }, \
+ { \
+ booz_fms_periodic(); \
+ }, \
+ { \
+ /*BoozControlSurfacesSetFromCommands();*/
\
+ }, \
+ { \
+ LED_PERIODIC(); \
+ }, \
+ { baro_periodic();
+ }, \
+ {},
\
+ {},
\
+ {},
\
+ {},
\
+ { \
+ Booz2TelemetryPeriodic();
\
+ } \
+ ); \
+
+#ifdef USE_GPS
+ if (radio_control.status != RADIO_CONTROL_OK && \
+ booz2_autopilot_mode == BOOZ2_AP_MODE_NAV && GpsIsLost())
\
+ booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
+ booz_gps_periodic();
+#endif
+
+#ifdef USE_EXTRA_ADC
+ booz2_analog_periodic();
+#endif
+
+#ifdef USE_MODULES
+ modules_periodic_task();
+#endif
+
+ if (booz2_autopilot_in_flight) {
+ RunOnceEvery(512, { booz2_autopilot_flight_time++; datalink_time++; });
+ }
+
+}
+
+STATIC_INLINE void booz2_main_event( void ) {
+
+ DatalinkEvent();
+
+ if (booz2_autopilot_rc) {
+ RadioControlEvent(booz2_autopilot_on_rc_frame);
+ }
+
+ BoozImuEvent(on_gyro_accel_event, on_mag_event);
+
+ BaroEvent(on_baro_abs_event, on_baro_dif_event);
+
+#ifdef USE_GPS
+ BoozGpsEvent(on_gps_event);
+#endif
+
+#ifdef BOOZ_FAILSAFE_GROUND_DETECT
+ BoozDetectGroundEvent();
+#endif
+
+#ifdef USE_MODULES
+ modules_event_task();
+#endif
+
+}
+
+static inline void on_gyro_accel_event( void ) {
+
+ BoozImuScaleGyro(booz_imu);
+ BoozImuScaleAccel(booz_imu);
+
+ if (booz_ahrs.status == BOOZ_AHRS_UNINIT) {
+ booz_ahrs_aligner_run();
+ if (booz_ahrs_aligner.status == BOOZ_AHRS_ALIGNER_LOCKED)
+ booz_ahrs_align();
+ }
+ else {
+ booz_ahrs_propagate();
+ booz_ahrs_update_accel();
+#ifdef SITL
+ if (nps_bypass_ahrs) sim_overwrite_ahrs();
+#endif
+ booz_ins_propagate();
+ }
+}
+
+static inline void on_baro_abs_event( void ) {
+ booz_ins_update_baro();
+}
+
+static inline void on_baro_dif_event( void ) {
+
+}
+
+static inline void on_gps_event(void) {
+ booz_ins_update_gps();
+}
+
+static inline void on_mag_event(void) {
+ BoozImuScaleMag(booz_imu);
+ if (booz_ahrs.status == BOOZ_AHRS_RUNNING)
+ booz_ahrs_update_mag();
+}
Copied: paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.h (from rev
5579, paparazzi3/trunk/sw/airborne/booz/booz2_main.h)
===================================================================
--- paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.h
(rev 0)
+++ paparazzi3/trunk/sw/airborne/firmwares/rotorcraft/main.h 2010-08-22
20:45:21 UTC (rev 5582)
@@ -0,0 +1,37 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2008-2009 Antoine Drouin <address@hidden>
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING. If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef BOOZ2_MAIN_H
+#define BOOZ2_MAIN_H
+
+#ifdef SITL
+#define STATIC_INLINE extern
+#else
+#define STATIC_INLINE static inline
+#endif
+
+STATIC_INLINE void booz2_main_init( void );
+STATIC_INLINE void booz2_main_periodic( void );
+STATIC_INLINE void booz2_main_event( void );
+
+#endif /* BOOZ2_MAIN_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5582] moved booz/booz2_main.c to firmwares/rotorcraft/main.c,
antoine drouin <=