-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rotorcraft] split arming code definition from autopilot (#2550)
the arming states are currently defined in autopilot_static.h, which is not compatible with the use of generated autopilot
- Loading branch information
1 parent
c53756b
commit de22fb1
Showing
8 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (C) 2020 Gautier Hattenberger <gautier.hattenberger@enac.fr> | ||
* | ||
* 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, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @file firmwares/rotorcraft/autopilot_arming.h | ||
* | ||
* Arming procedure for rotorcraft | ||
* Several options can be selected: | ||
* - yaw stick | ||
* - switch position | ||
* - throttle stick | ||
* | ||
*/ | ||
|
||
#ifndef AUTOPILOT_ARMING_H | ||
#define AUTOPILOT_ARMING_H | ||
|
||
/* Include arming procedure, yaw stick by default */ | ||
#if USE_KILL_SWITCH_FOR_MOTOR_ARMING | ||
#include "autopilot_arming_switch.h" | ||
PRINT_CONFIG_MSG("Using kill switch for motor arming") | ||
#elif USE_THROTTLE_FOR_MOTOR_ARMING | ||
#include "autopilot_arming_throttle.h" | ||
PRINT_CONFIG_MSG("Using throttle for motor arming") | ||
#else | ||
#include "autopilot_arming_yaw.h" | ||
PRINT_CONFIG_MSG("Using 2 sec yaw for motor arming") | ||
#endif | ||
|
||
#endif /* AUTOPILOT_ARMING_H */ |
52 changes: 52 additions & 0 deletions
52
sw/airborne/firmwares/rotorcraft/autopilot_arming_common.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (C) 2020 Gautier Hattenberger <gautier.hattenberger@enac.fr> | ||
* | ||
* 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, see | ||
* <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @file firmwares/rotorcraft/autopilot_arming_common.h | ||
* | ||
* Arming procedure for rotorcraft, common definitions | ||
*/ | ||
|
||
#ifndef AUTOPILOT_ARMING_COMMON_H | ||
#define AUTOPILOT_ARMING_COMMON_H | ||
|
||
#include "autopilot_rc_helpers.h" | ||
|
||
/* Arming status*/ | ||
#define AP_ARMING_STATUS_NO_RC 0 | ||
#define AP_ARMING_STATUS_WAITING 1 | ||
#define AP_ARMING_STATUS_ARMING 2 | ||
#define AP_ARMING_STATUS_ARMED 3 | ||
#define AP_ARMING_STATUS_DISARMING 4 | ||
#define AP_ARMING_STATUS_KILLED 5 | ||
#define AP_ARMING_STATUS_YAW_CENTERED 6 | ||
#define AP_ARMING_STATUS_THROTTLE_DOWN 7 | ||
#define AP_ARMING_STATUS_NOT_MODE_MANUAL 8 | ||
#define AP_ARMING_STATUS_UNARMED_IN_AUTO 9 | ||
#define AP_ARMING_STATUS_THROTTLE_NOT_DOWN 10 | ||
#define AP_ARMING_STATUS_STICKS_NOT_CENTERED 11 | ||
#define AP_ARMING_STATUS_PITCH_NOT_CENTERED 12 | ||
#define AP_ARMING_STATUS_ROLL_NOT_CENTERED 13 | ||
#define AP_ARMING_STATUS_YAW_NOT_CENTERED 14 | ||
#define AP_ARMING_STATUS_AHRS_NOT_ALLIGNED 15 | ||
#define AP_ARMING_STATUS_OUT_OF_GEOFENCE 16 | ||
#define AP_ARMING_STATUS_LOW_BATTERY 17 | ||
|
||
#endif /* AUTOPILOT_ARMING_COMMON_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters