Commit Graph

162 Commits

Author SHA1 Message Date
Michael du Breuil 78442b7e81 Plane: make the initialization of the gcs instances follow the define 2016-04-11 17:54:46 -07:00
Andrew Tridgell 8b30569ad1 Plane: setup quadplane earlier in startup
this ensures the GCS gets the full parameter list as the param count
will be set before mavlink starts
2016-04-03 06:49:38 +10:00
Andrew Tridgell f4ccf94dfc Plane: added QLAND mode
for VTOL landing. Use for failsafe as well
2016-03-09 18:20:41 +11:00
Andrew Tridgell 927efa90f8 Plane: fixed log printing of Q modes 2016-03-09 17:29:13 +11:00
Andrew Tridgell ad78a31255 Plane: move set_dataflash(0 for static logging 2016-02-24 09:18:05 +11:00
Andrew Tridgell 1acf25b6e2 Plane: use set_dataflash()
give GCS_MAVLINK a dataflash object for logging text messages
2016-02-22 12:34:32 +11:00
Tom Pittenger fa53263ca9 Plane: make throttle_percentage() signed 2016-02-11 18:46:01 +11:00
Andrew Tridgell 93185be1ff Plane: reset land_pre_flare on mode change 2016-02-09 14:18:02 +11:00
Tom Pittenger 1cb094f12e Plane: make throttle signed (pos and neg) 2016-02-09 14:18:02 +11:00
Tom Pittenger b8d5369ebd Plane: add flight stage LAND_PREFLARE 2016-02-09 14:18:02 +11:00
Andrew Tridgell d82c8dcd6d ArduPlane: update for changed AP_Camera API 2016-01-29 09:19:44 +11:00
Dario Lindo Andres 9bba55f937 ArduPlane: Added precise camera trigger logging
Added update_trigger and check_digital_pin functions
added camera trigger precise time mark
detect camera feedback pin status
added support for simple digital pin
included support for digital pin. Already included in
added support for TRIGGER MSG
2016-01-29 09:19:43 +11:00
Jonathan Challinger 9000756c80 Plane: reflect changes to AP_Mount 2016-01-23 10:35:47 +09:00
Andrew Tridgell 0a0e191284 Plane: init rc output after quadplane setup
this ensures first PWM pulses are correct
2016-01-09 07:38:55 +11:00
Andrew Tridgell b1177521ef Plane: show throttle level in vtol modes 2016-01-09 07:38:54 +11:00
Andrew Tridgell 0d6b353bcb Plane: added quad assistance and auto support for quadplane 2016-01-09 07:38:52 +11:00
Andrew Tridgell 2983576067 Plane: added QLOITER mode
quadplane loiter
2016-01-09 07:38:52 +11:00
Andrew Tridgell ca85c332d6 Plane: separate QSTABILIZE and QHOVER modes 2016-01-09 07:38:52 +11:00
Andrew Tridgell 6468fc6d93 Plane: Initial implementation of quadplane
adds "HOVER" mode
2016-01-09 07:38:52 +11:00
Tom Pittenger 21205f8b41 Plane: improved crash detection logic and agility
- inhibit crash detection warnings when disabled by param so now it can be completely disabled
- reset is_crashed when disabled by param
- fixed pre-takeoff detection bug by adding in_preLaunch_flight_stage() where we are actually in FLIGHT_NORMAL instead of FLIGHT_TAKEOFF during setup of bungee launches. This now detects if we're in that state
- simplified the use of been_auto_flying to check across all flight stages. before it was excluded to handle hand-launches which can now be detected with in_preLaunch_flight_stage()
- added impact detector timer to clamp is_flying a few seconds after an impact
- logging new impact detector as "STAT.Hit"
2016-01-02 09:58:31 +11:00
Tom Pittenger 3b06260358 Plane: refactored interface
- added guided mode handling
- now handles gracefully a manual mode changes during evasion
2015-12-31 15:36:49 +11:00
Andrew Tridgell 7a5808276e Plane: fixed two build warnings with clang 2015-12-29 18:52:00 +11:00
Andrew Tridgell 513d5c17b9 Plane: allow for settable main loop rate 2015-12-27 14:57:19 +09:00
Michael du Breuil 4b40a884e9 Plane: Don't disable compass checks for HIL mode unless actually in hil mode 2015-12-08 05:07:46 -07:00
Luis Vale Gonçalves b7f3782e4e Plane: Text revisions
text revisions
2015-11-26 07:56:52 +11:00
Caio Marcelo de Oliveira Filho c8888329e1 Plane: use millis/micros/panic functions 2015-11-20 12:26:40 +09:00
lvale e18181e5c2 Plane: Uniformization of severities
Plane uniformization of severities
2015-11-09 09:38:25 +11:00
Tom Pittenger 178bbb080b Plane: improve crosstrack error while navigating to loiter point
There is no crosstrack concept in the loiter navigation so when going from waypoint to loiter you will not converge onto the line between those two points. This commit adds crosstracking by performing normal waypoint navigation until you get near it.
2015-11-09 08:25:26 +11:00
Lucas De Marchi 0151853c21 ArduPlane: remove check for MAVLINK_COMM_NUM_BUFFERS 2015-11-04 12:14:15 +11:00
Lucas De Marchi d1be74c87e ArduPlane: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 84da1f5039 Rename gcs_send_text_P to gcs_send_text 2015-10-30 14:35:07 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Andrew Tridgell 458e967d06 Plane: added RPM logging
useful for seeing if a petrol motor is still running
2015-09-24 20:58:18 +10:00
Randy Mackay 6da53ae3b2 Plane: replace SKIP_GYRO_CAL with INS_GYR_CAL
Also calibrate gyros with accel cal and set trim
2015-09-21 17:06:43 +09:00
Andrew Tridgell 9e7c38b933 Plane: moved logging of mode to Log_Write_Vehicle_Startup_Messages
this fixes a problem where the initial mode isn't logged on arming
2015-09-17 20:15:26 +10:00
Peter Barker c2d61391ef Plane: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 15:20:20 +10:00
Tom Pittenger 81f8358705 Plane: restart landing by jumping to DO_LAND_START or decrement mission
only takes effect on mode change
2015-08-29 21:17:35 +10:00
squilter 583c087eca Plane: update severities 2015-08-28 10:04:35 +10:00
Andrew Tridgell 019f2af930 Plane: fixed build with HIL disabled 2015-08-23 22:21:51 +10:00
ziltoid2 b9dd6b7aac Plane: prevent delayed compass HIL data from disabling compass at system startup only 2015-08-23 16:48:48 +10:00
Tom Pittenger 204ff7b158 Plane: move statics into new struct
removed default case statements
2015-08-23 10:34:18 +10:00
Tom Pittenger da8f4f9e95 Plane: reworked is_flying
add crash detection, allow disengage via param CRASH_DETECT
improved is_flying behavior
take off, landing and hard-landing improvements
add stillness check to is_flying and log it
minimum airspeed is determined ARSPD_FBW_MIN*0.75
2015-08-23 10:34:18 +10:00
Andrew Tridgell f2c1010501 Plane: prevent mode switch changes changing WP tracking
this fixes a bug where a mode switch change during an AUTO mission
which does not change the flight mode would cause cross tracking to be
reset, so the plane will not correctly follow the desired track

Many thanks to Michael Du Breuil for the log that showed this bug
2015-08-12 14:42:49 +10:00
squilter c24ba83fb1 Plane: init vehicle capabilities 2015-08-05 16:08:49 +09:00
Andrew Tridgell 6c07795b63 Plane: added HIL_SUPPORT define
disable HIL support on APM2 to save flash space
2015-07-30 11:04:31 +10:00
Andrew Tridgell 266857c595 Plane: avoid linking optflow on APM2
not used, just taking memory
2015-07-10 16:46:30 +10:00
Andre Kjellstrup edc32092ce Plane: Do not run long_failsafe during final or landing. 2015-07-02 14:28:45 +10:00
Andre Kjellstrup 9d525d4382 Plane: Do not run FailSafe if on final approach or landing.
A failsafe (Circle, RTL) would easily become a disaster if trigged
during approach or final.
2015-07-02 14:28:45 +10:00
Andrew Tridgell 4aac2c5c96 Plane: trigger OVERRIDE_CHAN in px4io
setup the MODESWITCH channel as our OVERRIDE_CHAN, allowing for
instant manual passthru in px4io when OVERRIDE_CHAN goes above 1750

This makes for faster switching, and avoids bugs where a still enabled
FMU channel disables override
2015-06-21 18:19:16 +10:00
Andre Kjellstrup 19aa7caad0 GCS_Failsafe: option to trigger only in AUTO mode. 2015-06-18 07:52:43 +10:00
Andrew Tridgell bc6a52f8db Plane: fixed handling of OVERRIDE_CHAN on arming
When arming we need to ensure that we don't enable any channels
otherwise PX4IO will think that FMU is active and will stop running
the internal RC mixer
2015-06-09 12:48:55 +10:00
Andrew Tridgell 47f4a5db10 Plane: try to load px4 mixer 10 times on boot
this allows for possible temporary failures
2015-06-02 21:59:03 +10:00
Randy Mackay 9ece826c28 Plane: Log_Write_Startup writes parameters 2015-06-01 20:22:50 +09:00
Grant Morphett 2c3cff7f84 Plane: Moving parameter logging to be after all systems have started 2015-06-01 20:22:40 +09:00
Andrew Tridgell 441d96c946 Plane: fixed APM1 build 2015-05-21 07:48:53 +10:00
Andrew Tridgell b92c2409e4 Plane: added local millis() and micros() to reduce code size a bit 2015-05-21 07:48:53 +10:00
Andrew Tridgell 18c37935c9 Plane: convert from .pde to .cpp files 2015-05-21 07:48:52 +10:00