Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotorcraft arming #174

Merged
merged 9 commits into from
Apr 10, 2012
Merged

Rotorcraft arming #174

merged 9 commits into from
Apr 10, 2012

Conversation

flixr
Copy link
Member

@flixr flixr commented Apr 5, 2012

  • moved arming sequences to separate files
  • never start the motors if AHRS is not aligned (disable it with AUTOPILOT_DISABLE_AHRS_KILL)
  • if USE_KILL_SWITCH_FOR_MOTOR_ARMING is defined (to 1):
    • switch kill switch off to arm the motors
    • if kill switch is off during startup, you need to kill again first, then unkill to start
    • throttle needs to be down, other sticks centered to start motors
    • need to be in manual mode to start the motors
  • if USE_THROTTLE_FOR_MOTOR_ARMING is defined (to 1):
    • automatically start motors when applying throttle
    • if throttle was not down at startup, you need to put throttle down again first
    • other sticks need to be centered to start motors
    • need to be in manual mode to start the motors
  • else the "default" arming sequence with the yaw-stick-to-the-corner is used

* moved arming sequences to separate files
* removed kill_throttle variable, use provided functions to turn motors on/off, was only used in settings anyway...
* if AUTOPILOT_KILL_WITHOUT_AHRS is defined, never start the motors if AHRS is not aligned
* if AUTOPILOT_ARMING_KILL_SWITCH is defined:
  * switch kill switch off to arm the motors
  * if kill switch is off during startup, you need to kill again first, then unkill to start
  * throttle needs to be down, other sticks centered to start motors
  * need to be in manual mode to start the motors
* if AUTOPILOT_ARMING_THROTTLE is defined:
  * automatically unkill when applying throttle
  * if throttle was not down at startup, you need to put throttle down again first
  * other sticks need to be centered to start motors
  * need to be in manual mode to start the motors
* else the "default" arming sequence with the yaw-stick-to-the-corner is used
@gautierhattenberger
Copy link
Member

kill_throttle was needed to kill the autopilot from the GCS by connecting the button to the setting

@flixr
Copy link
Member Author

flixr commented Apr 5, 2012

I just connected autopilot_motors_on to it...

@flixr
Copy link
Member Author

flixr commented Apr 5, 2012

ah damn.. it's still needed for the button in the stip, right? Any better way to do this?

…CS is connected to the kill_throttle setting
…igned

to be able to change the mode via RC if the AHRS is not yet aligned, define AUTOPILOT_DISABLE_AHRS_KILL
@flixr
Copy link
Member Author

flixr commented Apr 6, 2012

ok, kill_throttle is really only needed for the kill button in the strip... this is a bit annoying, but well...
I also made it the default now to go into kill mode until the ahrs is aligned.
If that is not desired (old behaviour), define AUTOPILOT_DISABLE_AHRS_KILL

I have tested the new modes and they worked the way I expected... anything else before we merge it into dev?
Should some behaviour be different?

…if AHRS is not aligned (unless AUTOPILOT_DISABLE_AHRS_KILL is defined)
@gautierhattenberger
Copy link
Member

I can see two solutions to handle motors_on/kill_throttle.
Choose one variable name for all AP firmwares.
Use the AC config file to tell which settings to connect to the buttons (I already made something like that to configure altitude shift buttons).

@OpenUAS
Copy link
Contributor

OpenUAS commented Apr 10, 2012

AUTOPILOT_ARMING_THROTTLE maybe AIRCRAFT_ARMING_THROTTLE etc., using autopilot for manual stuff somewhat confusing IMHO and "other sticks need to be centered to start motors" forced but not explanation why this would be better by default.

@flixr
Copy link
Member Author

flixr commented Apr 10, 2012

AUTOPILOT_ARMING_THROTTLE maybe AIRCRAFT_ARMING_THROTTLE etc., using
autopilot for manual stuff somewhat confusing IMHO

Sure, we could rename the defines. It's just that we already have a few
that start with AUTOPILOT_ and it might be actually more confusing to start
naming some AIRCRAFT_ while some (like the AUTOPILOT_DISABLE_AHRS_KILL)
keep the AUTOPILOT prefix...
I don't really mind either way... I'll change it to whatever the majority
prefers.

"other sticks need to be centered to start motors" forced but not
explanation why this would be better by default.

It's just an additional measure to ensure the motors won't immediately spin
up faster because you already give some attitude commands. You normally do
that anyway as you don't give a pitch command while you start the motors. I
can't think of any reason to disable this.
But we could actually add that to the push-yaw stick sequence as well.. So
that you need to have pitch and roll sticks centered there as well...

@flixr
Copy link
Member Author

flixr commented Apr 10, 2012

ok, changed the names of the defines to USE_KILL_SWITCH_FOR_MOTOR_ARMING and USE_THROTTLE_FOR_MOTOR_ARMING
You also need to either add them as defines in the firmware/target section (so it ends up as command line define which is implicitly defined to 1) or explicitly define it to 1.
Anthing else, or can we merge this now?

flixr added a commit that referenced this pull request Apr 10, 2012
* never start the motors if AHRS is not aligned (disable it with AUTOPILOT_DISABLE_AHRS_KILL)
* if USE_KILL_SWITCH_FOR_MOTOR_ARMING is defined (to 1):
  * switch kill switch off to arm the motors
  * if kill switch is off during startup, you need to kill again first, then unkill to start
  * throttle needs to be down, other sticks centered to start motors
  * need to be in manual mode to start the motors
* if USE_THROTTLE_FOR_MOTOR_ARMING is defined (to 1):
  * automatically start motors when applying throttle
  * if throttle was not down at startup, you need to put throttle down again first
  * other sticks need to be centered to start motors
  * need to be in manual mode to start the motors
* else the "default" arming sequence with the yaw-stick-to-the-corner is used
* if you have a RADIO_KILL_SWITCH defined, it it will be used to go into kill mode, regardless of what motor arming option is used
@flixr flixr merged commit 056774c into paparazzi:dev Apr 10, 2012
flixr added a commit that referenced this pull request Apr 10, 2012
* rotorcrafts: additional motor arming options: #174
* rotorcrafts: easier setting/tuning of nominal hover throttle if adaptive filter is not used: #177
* rotorcrafts: some more fixed when changing vertical guidance modes
* bat_checker module
* updated some ADC stuff for lisa/m: #159
  You should now be able to use ADC_1, ADC_2, ADC_3 for the ADCs on the ANALOG1
flixr added a commit that referenced this pull request Apr 23, 2012
* rotorcrafts: additional motor arming options: #174
* rotorcrafts: easier setting/tuning of nominal hover throttle if adaptive filter is not used: #177
* rotorcrafts: some more fixed when changing vertical guidance modes
* updated some ADC stuff for lisa/m: #159
  You should now be able to use ADC_1, ADC_2, ADC_3 for the ADCs on the ANALOG1
* luftboot support
* fix the NMEA parser, now it at least works for some basic things
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants