diff --git a/conf/settings/settings_booz2.xml b/conf/settings/settings_booz2.xml
index 7ad9ab0951..80914db365 100644
--- a/conf/settings/settings_booz2.xml
+++ b/conf/settings/settings_booz2.xml
@@ -5,8 +5,7 @@
-
-
+
diff --git a/sw/airborne/booz/booz2_autopilot.c b/sw/airborne/booz/booz2_autopilot.c
index 4ba69d7d0d..9c7fed0f67 100644
--- a/sw/airborne/booz/booz2_autopilot.c
+++ b/sw/airborne/booz/booz2_autopilot.c
@@ -1,6 +1,6 @@
/*
* $Id$
- *
+ *
* Copyright (C) 2008-2009 Antoine Drouin
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* 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.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -34,7 +34,6 @@ uint8_t booz2_autopilot_mode;
uint8_t booz2_autopilot_mode_auto2;
bool_t booz2_autopilot_motors_on;
bool_t booz2_autopilot_in_flight;
-uint8_t booz2_autopilot_tol;
uint32_t booz2_autopilot_motors_on_counter;
uint32_t booz2_autopilot_in_flight_counter;
bool_t kill_throttle;
@@ -54,7 +53,6 @@ void booz2_autopilot_init(void) {
booz2_autopilot_motors_on_counter = 0;
booz2_autopilot_in_flight_counter = 0;
booz2_autopilot_mode_auto2 = BOOZ2_MODE_AUTO2;
- booz2_autopilot_tol = 0;
booz2_autopilot_detect_ground = FALSE;
}
@@ -66,7 +64,7 @@ void booz2_autopilot_init(void) {
#endif
void booz2_autopilot_periodic(void) {
-
+
RunOnceEvery(50, nav_periodic_task_10Hz());
#ifdef BOOZ_FAILSAFE_GROUND_DETECT
if (booz2_autopilot_mode == BOOZ2_AP_MODE_FAILSAFE && booz2_autopilot_detect_ground) {
@@ -79,13 +77,13 @@ void booz2_autopilot_periodic(void) {
booz2_autopilot_mode == BOOZ2_AP_MODE_FAILSAFE ||
#endif
booz2_autopilot_mode == BOOZ2_AP_MODE_KILL ) {
- SetCommands(booz2_commands_failsafe,
+ SetCommands(booz2_commands_failsafe,
booz2_autopilot_in_flight, booz2_autopilot_motors_on);
}
else {
booz2_guidance_v_run( booz2_autopilot_in_flight );
booz2_guidance_h_run( booz2_autopilot_in_flight );
- SetCommands(booz_stabilization_cmd,
+ SetCommands(booz_stabilization_cmd,
booz2_autopilot_in_flight, booz2_autopilot_motors_on);
}
@@ -160,8 +158,8 @@ void booz2_autopilot_set_mode(uint8_t new_autopilot_mode) {
break;
}
booz2_autopilot_mode = new_autopilot_mode;
- }
-
+ }
+
}
#define THROTTLE_STICK_DOWN() \
@@ -234,25 +232,25 @@ void booz2_autopilot_on_rc_frame(void) {
DOWNLINK_SEND_BOOZ_DEBUG(&rc_values[RADIO_THROTTLE], \
&rc_values[RADIO_ROLL], \
&rc_values[RADIO_PITCH], \
- &rc_values[RADIO_YAW]);
+ &rc_values[RADIO_YAW]);
#endif
-
+
uint8_t new_autopilot_mode = 0;
BOOZ_AP_MODE_OF_PPRZ(radio_control.values[RADIO_CONTROL_MODE], new_autopilot_mode);
booz2_autopilot_set_mode(new_autopilot_mode);
-
+
#ifdef RADIO_CONTROL_KILL_SWITCH
if (radio_control.values[RADIO_CONTROL_KILL_SWITCH] < 0)
booz2_autopilot_set_mode(BOOZ2_AP_MODE_KILL);
#endif
-
+
BOOZ2_AUTOPILOT_CHECK_MOTORS_ON();
BOOZ2_AUTOPILOT_CHECK_IN_FLIGHT();
kill_throttle = !booz2_autopilot_motors_on;
-
+
if (booz2_autopilot_mode > BOOZ2_AP_MODE_FAILSAFE) {
booz2_guidance_v_read_rc();
booz2_guidance_h_read_rc(booz2_autopilot_in_flight);
}
-
+
}
diff --git a/sw/airborne/booz/booz2_autopilot.h b/sw/airborne/booz/booz2_autopilot.h
index e8901796c3..2cef6901ef 100644
--- a/sw/airborne/booz/booz2_autopilot.h
+++ b/sw/airborne/booz/booz2_autopilot.h
@@ -1,6 +1,6 @@
/*
* $Id$
- *
+ *
* Copyright (C) 2008-2009 Antoine Drouin
*
* This file is part of paparazzi.
@@ -18,7 +18,7 @@
* 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.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -48,7 +48,6 @@ extern uint8_t booz2_autopilot_mode;
extern uint8_t booz2_autopilot_mode_auto2;
extern bool_t booz2_autopilot_motors_on;
extern bool_t booz2_autopilot_in_flight;
-extern uint8_t booz2_autopilot_tol;
extern bool_t kill_throttle;
extern void booz2_autopilot_init(void);
@@ -84,22 +83,6 @@ extern bool_t booz2_autopilot_detect_ground;
}
-#define booz2_autopilot_SetTol(_v) { \
- booz2_autopilot_tol = _v; \
- if (_v == 1) { \
- booz_ins_vff_realign = TRUE; \
- booz2_guidance_v_z_sp = -POS_BFP_OF_REAL(2); \
- booz2_autopilot_mode_auto2 = BOOZ2_AP_MODE_ATTITUDE_Z_HOLD; \
- booz2_autopilot_set_mode(booz2_autopilot_mode_auto2); \
- } \
- if (_v == 2) { \
- booz2_guidance_v_zd_sp = SPEED_BFP_OF_REAL(0.5); \
- booz2_autopilot_mode_auto2 = BOOZ2_AP_MODE_ATTITUDE_CLIMB; \
- booz2_autopilot_set_mode(booz2_autopilot_mode_auto2); \
- } \
- booz2_autopilot_tol = 0; \
-}
-
#define TRESHOLD_GROUND_DETECT ACCEL_BFP_OF_REAL(15.)
#define BoozDetectGroundEvent() { \
diff --git a/sw/airborne/csc/mercury_ap.c b/sw/airborne/csc/mercury_ap.c
index 630df4ef5f..64a382e8de 100644
--- a/sw/airborne/csc/mercury_ap.c
+++ b/sw/airborne/csc/mercury_ap.c
@@ -16,7 +16,7 @@
* 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.
+ * Boston, MA 02111-1307, USA.
*
*/
@@ -34,7 +34,7 @@
#include "string.h"
#include "booz_radio_control.h"
#include "mercury_supervision.h"
-#include "actuators.h"
+#include "actuators.h"
#include "props_csc.h"
#include "csc_booz2_guidance_v.h"
@@ -48,7 +48,6 @@ uint8_t booz2_autopilot_mode;
uint8_t booz2_autopilot_mode_auto2;
bool_t booz2_autopilot_motors_on;
bool_t booz2_autopilot_in_flight;
-uint8_t booz2_autopilot_tol;
uint32_t booz2_autopilot_motors_on_counter;
uint32_t booz2_autopilot_in_flight_counter;
@@ -71,7 +70,6 @@ void csc_ap_init(void) {
booz2_autopilot_motors_on_counter = 0;
booz2_autopilot_in_flight_counter = 0;
booz2_autopilot_mode_auto2 = BOOZ2_MODE_AUTO2;
- booz2_autopilot_tol = 0;
props_throttle_pass = 0;
for(uint8_t i = 0; i < PROPS_NB; i++){
@@ -153,14 +151,14 @@ void csc_ap_periodic(uint8_t _in_flight, uint8_t kill) {
booz_stabilization_attitude_read_rc(booz2_autopilot_in_flight);
booz_stabilization_attitude_run(booz2_autopilot_in_flight);
booz2_guidance_v_run(booz2_autopilot_in_flight);
-
+
booz_stabilization_cmd[COMMAND_THRUST] = (int32_t)radio_control.values[RADIO_CONTROL_THROTTLE] * 105 / 7200 + 95;
-
-
+
+
CscSetCommands(booz_stabilization_cmd,
booz2_autopilot_in_flight,booz2_autopilot_motors_on);
-
-
+
+
BOOZ2_SUPERVISION_RUN(mixed_commands, commands, booz2_autopilot_motors_on);
@@ -168,7 +166,7 @@ void csc_ap_periodic(uint8_t _in_flight, uint8_t kill) {
Bound(booz_stabilization_cmd[COMMAND_THRUST],0,255);
for(uint8_t i = 0; i < PROPS_NB; i++)
mixed_commands[i] = booz_stabilization_cmd[COMMAND_THRUST];
-
+
}
for(uint8_t i = 0; i < PROPS_NB; i++){
@@ -179,13 +177,13 @@ void csc_ap_periodic(uint8_t _in_flight, uint8_t kill) {
}
props_commit();
-
-
+
+
MERCURY_SURFACES_SUPERVISION_RUN(Actuator,
booz_stabilization_cmd,
mixed_commands,
(!booz2_autopilot_in_flight));
ActuatorsCommit();
-
+
SendCscFromActuators();
}