mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
starting to merge booz, moving booz2_autopilot to firmwares/rotorcraft/autopilot
This commit is contained in:
@@ -44,7 +44,7 @@ SRC_ARCH=arch/$(ARCH)
|
|||||||
|
|
||||||
CFG_BOOZ=$(PAPARAZZI_SRC)/conf/autopilot/
|
CFG_BOOZ=$(PAPARAZZI_SRC)/conf/autopilot/
|
||||||
|
|
||||||
BOOZ_INC = -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -I$(SRC_BOARD)
|
BOOZ_INC = -I$(SRC_FIRMWARE) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -I$(SRC_BOARD)
|
||||||
|
|
||||||
|
|
||||||
ap.ARCHDIR = $(ARCH)
|
ap.ARCHDIR = $(ARCH)
|
||||||
@@ -178,7 +178,7 @@ endif
|
|||||||
# include subsystems/rotorcraft/ahrs_lkf.makefile
|
# include subsystems/rotorcraft/ahrs_lkf.makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
ap.srcs += $(SRC_BOOZ)/booz2_autopilot.c
|
ap.srcs += $(SRC_FIRMWARE)/autopilot.c
|
||||||
|
|
||||||
ap.srcs += math/pprz_trig_int.c
|
ap.srcs += math/pprz_trig_int.c
|
||||||
ap.srcs += $(SRC_BOOZ)/booz_stabilization.c
|
ap.srcs += $(SRC_BOOZ)/booz_stabilization.c
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ sim.srcs += $(SRC_BOOZ)/booz2_analog.c $(SRC_BOOZ_SIM)/booz2_analog_hw.c
|
|||||||
#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_VERSION_1_1
|
||||||
|
|
||||||
sim.srcs += $(SRC_BOOZ)/booz2_autopilot.c
|
sim.srcs += $(SRC_FIRMWARE)/autopilot.c
|
||||||
|
|
||||||
#
|
#
|
||||||
# in makefile section of airframe xml
|
# in makefile section of airframe xml
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<flight_plan alt="5" ground_alt="0" lat0="37.6136" lon0="-122.3569" max_dist_from_home="400" name="Booz Test Sim" security_height="2">
|
<flight_plan alt="5" ground_alt="0" lat0="37.6136" lon0="-122.3569" max_dist_from_home="400" name="Booz Test Sim" security_height="2">
|
||||||
<header>
|
<header>
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
</header>
|
</header>
|
||||||
<waypoints>
|
<waypoints>
|
||||||
<waypoint name="HOME" x="0.0" y="0.0"/>
|
<waypoint name="HOME" x="0.0" y="0.0"/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<settings>
|
<settings>
|
||||||
<dl_settings>
|
<dl_settings>
|
||||||
<dl_settings NAME="DC">
|
<dl_settings NAME="DC">
|
||||||
<dl_setting MAX="1" MIN="0" STEP="1" VAR="booz2_autopilot_power_switch" module="booz2_autopilot" handler="SetPowerSwitch" shortname="Shutter">
|
<dl_setting MAX="1" MIN="0" STEP="1" VAR="booz2_autopilot_power_switch" module="autopilot" handler="SetPowerSwitch" shortname="Shutter">
|
||||||
<strip_button name="Photo" icon="digital-camera.png" value="1"/>
|
<strip_button name="Photo" icon="digital-camera.png" value="1"/>
|
||||||
<strip_button name="Photo Off" icon="digital-camera-off.png" value="0"/>
|
<strip_button name="Photo Off" icon="digital-camera-off.png" value="0"/>
|
||||||
</dl_setting>
|
</dl_setting>
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
<key_press key="v" value="7"/>
|
<key_press key="v" value="7"/>
|
||||||
<key_press key="h" value="8"/>
|
<key_press key="h" value="8"/>
|
||||||
</dl_setting>
|
</dl_setting>
|
||||||
<dl_setting var="booz2_autopilot_mode_auto2" min="0" step="1" max="12" module="booz2_autopilot" shortname="auto2" values="Fail|Kill|Rate|Att|Rate_rcC|Att_rcC|Att_C|Rate_Z|Att_Z|Hover|Hover_C|Hover_Z|Nav"/>
|
<dl_setting var="booz2_autopilot_mode_auto2" min="0" step="1" max="12" module="autopilot" shortname="auto2" values="Fail|Kill|Rate|Att|Rate_rcC|Att_rcC|Att_C|Rate_Z|Att_Z|Hover|Hover_C|Hover_Z|Nav"/>
|
||||||
<dl_setting var="kill_throttle" min="0" step="1" max="1" module="booz2_autopilot" values="Resurrect|Kill" handler="KillThrottle"/>
|
<dl_setting var="kill_throttle" min="0" step="1" max="1" module="autopilot" values="Resurrect|Kill" handler="KillThrottle"/>
|
||||||
<dl_setting var="booz2_autopilot_power_switch" min="0" step="1" max="1" module="booz2_autopilot" values="OFF|ON" handler="SetPowerSwitch">
|
<dl_setting var="booz2_autopilot_power_switch" min="0" step="1" max="1" module="autopilot" values="OFF|ON" handler="SetPowerSwitch">
|
||||||
<strip_button name="POWER ON" icon="on.png" value="1"/>
|
<strip_button name="POWER ON" icon="on.png" value="1"/>
|
||||||
<strip_button name="POWER OFF" icon="off.png" value="0"/>
|
<strip_button name="POWER OFF" icon="off.png" value="0"/>
|
||||||
</dl_setting>
|
</dl_setting>
|
||||||
<dl_setting var="booz2_autopilot_rc" min="0" step="1" max="1" module="booz2_autopilot" values="RC OFF|RC ON">
|
<dl_setting var="booz2_autopilot_rc" min="0" step="1" max="1" module="autopilot" values="RC OFF|RC ON">
|
||||||
<strip_button name="RC ON" value="1"/>
|
<strip_button name="RC ON" value="1"/>
|
||||||
<strip_button name="RC OFF" value="0"/>
|
<strip_button name="RC OFF" value="0"/>
|
||||||
</dl_setting>
|
</dl_setting>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
#include "booz_radio_control.h"
|
#include "booz_radio_control.h"
|
||||||
#include "booz_radio_control_spektrum_arch.h"
|
#include "booz_radio_control_spektrum_arch.h"
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
|
|
||||||
|
|
||||||
#define SPEKTRUM_CHANNELS_PER_FRAME 7
|
#define SPEKTRUM_CHANNELS_PER_FRAME 7
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include "booz_gps.h"
|
#include "booz_gps.h"
|
||||||
#include "booz2_ins.h"
|
#include "booz2_ins.h"
|
||||||
|
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "modules.h"
|
#include "modules.h"
|
||||||
#include "flight_plan.h"
|
#include "flight_plan.h"
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "booz_radio_control.h"
|
#include "booz_radio_control.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "booz_guidance.h"
|
#include "booz_guidance.h"
|
||||||
|
|
||||||
#include "actuators.h"
|
#include "actuators.h"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
#include "math/pprz_algebra_int.h"
|
#include "math/pprz_algebra_int.h"
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "booz_guidance.h"
|
#include "booz_guidance.h"
|
||||||
|
|
||||||
struct Booz_fms_imu_info {
|
struct Booz_fms_imu_info {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "mercury_xsens.h"
|
#include "mercury_xsens.h"
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "booz_stabilization.h"
|
#include "booz_stabilization.h"
|
||||||
#include "stabilization/booz_stabilization_attitude.h"
|
#include "stabilization/booz_stabilization_attitude.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
* Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
||||||
*
|
*
|
||||||
* This file is part of paparazzi.
|
* This file is part of paparazzi.
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with paparazzi; see the file COPYING. If not, write to
|
* along with paparazzi; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
|
|
||||||
#include "booz_radio_control.h"
|
#include "booz_radio_control.h"
|
||||||
#include "booz2_commands.h"
|
#include "booz2_commands.h"
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BOOZ2_AUTOPILOT_H
|
#ifndef AUTOPILOT_H
|
||||||
#define BOOZ2_AUTOPILOT_H
|
#define AUTOPILOT_H
|
||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
|
|
||||||
@@ -89,13 +89,13 @@ extern uint16_t booz2_autopilot_flight_time;
|
|||||||
_booz_mode = BOOZ2_MODE_MANUAL; \
|
_booz_mode = BOOZ2_MODE_MANUAL; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define booz2_autopilot_KillThrottle(_v) { \
|
#define autopilot_KillThrottle(_v) { \
|
||||||
kill_throttle = _v; \
|
kill_throttle = _v; \
|
||||||
if (kill_throttle) booz2_autopilot_motors_on = FALSE; \
|
if (kill_throttle) booz2_autopilot_motors_on = FALSE; \
|
||||||
else booz2_autopilot_motors_on = TRUE; \
|
else booz2_autopilot_motors_on = TRUE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define booz2_autopilot_SetPowerSwitch(_v) { \
|
#define autopilot_SetPowerSwitch(_v) { \
|
||||||
booz2_autopilot_power_switch = _v; \
|
booz2_autopilot_power_switch = _v; \
|
||||||
if (_v) { LED_OFF(POWER_SWITCH_LED); } \
|
if (_v) { LED_OFF(POWER_SWITCH_LED); } \
|
||||||
else { LED_ON(POWER_SWITCH_LED); } \
|
else { LED_ON(POWER_SWITCH_LED); } \
|
||||||
@@ -114,4 +114,4 @@ static inline void BoozDetectGroundEvent(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* BOOZ2_AUTOPILOT_H */
|
#endif /* AUTOPILOT_H */
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
#include "booz2_battery.h"
|
#include "booz2_battery.h"
|
||||||
|
|
||||||
#include "booz_fms.h"
|
#include "booz_fms.h"
|
||||||
#include "booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
|
|
||||||
#include "booz_stabilization.h"
|
#include "booz_stabilization.h"
|
||||||
#include "booz_guidance.h"
|
#include "booz_guidance.h"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
#include "math/pprz_algebra_int.h"
|
#include "math/pprz_algebra_int.h"
|
||||||
#include "booz/booz2_autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "booz/booz_stabilization.h"
|
#include "booz/booz_stabilization.h"
|
||||||
#include "booz/booz_guidance.h"
|
#include "booz/booz_guidance.h"
|
||||||
#include "booz/booz2_navigation.h"
|
#include "booz/booz2_navigation.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user