Commit Graph

104 Commits

Author SHA1 Message Date
Randy Mackay c4b5d47e1f Copter: white space fixes 2020-04-23 13:17:11 +09:00
murata 2822fa68fc Copter: Adding flight mode to flight mode unchangeable messages 2020-04-14 09:53:17 +09:00
Tatsuya Yamaguchi 735498e160 Copter: move zigzag exit into mode_zigzag.cpp 2020-03-26 14:56:40 +09:00
Peter Barker 136d0cce0b Copter: rewrite_get_alt_above_ground_cm for clarity
It's not entirely clear at a glance that we don't return an
uninitialised value off the stack here.
2020-03-03 21:38:03 +09:00
Andrew Tridgell dd5fafe30e Copter: added rangefinder height interpolated using inertial alt
this smooths rangefinder heights and allows for good estimated for
precision landing even with loss of some rangefinder samples during landing
2020-02-25 09:10:30 +09:00
Tatsuya Yamaguchi 9f577a23c8 Copter: stop spray if changing a mode from ZigZag to other 2020-02-19 19:56:56 +09:00
Randy Mackay b482d147df Copter: always store previous control mode
also minor spacing fixup
2019-12-12 09:13:24 +09:00
Peter Barker 10bbcf98be Copter: tidy land_run_vertical_control for precision-landing case 2019-12-11 08:18:49 +09:00
Gone4Dirt 180d4e713c Copter: Added autorotation flight mode and support 2019-11-29 08:06:10 +08:00
Bogdan Grigoruta 5183703243 Copter: move Mode::auto_takeoff_run to takeoff.cpp 2019-11-18 09:14:08 +09:00
Peter Barker e6c6189fe5 Copter: cope with change in namespace of LogEvent enum
Also move Acro Trainer types into an enum class as the global defines
interfere with the Event names.

Also eliminate the Log_Write_Event wrappers.
2019-11-05 08:19:26 +08:00
Michael du Breuil b42b1c08c4 Copter: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
Leonard Hall c11f2247eb Copter: System ID mode 2019-10-16 08:17:09 +09:00
Randy Mackay ca92f0505e Copter: follow mode restores offsets to zero on exit 2019-10-07 08:30:45 +09:00
Andrew Tridgell 328fff8585 Copter: fixed RC failsafe handling for no RC receiver
this stops us using uninitialised values in modes like circle which
can operate either with or without RC input. If we didn't have a RC
receiver attached then they would use a maximum yaw rate (which
produces quite a spectacular result for a tuned up racing quad)
2019-09-24 10:00:36 +10:00
Peter Barker b4537bebd8 Copter: move control_mode_t into being Mode::Number enum class
Fixes this compiler error:

In file included from ../../ArduCopter/sensors.cpp:1:
In file included from ../../ArduCopter/Copter.h:195:
../../ArduCopter/mode.h:1291:9: fatal error: declaration shadows a variable in the global namespace [-Wshadow]
        AUTO,           // after A and B defined, pilot toggle the switch from one side to the other, vehicle flies autonomously
        ^
../../ArduCopter/defines.h:38:5: note: previous declaration is here
    AUTO =          3,  // fully automatic waypoint control using mission commands
    ^
1 error generated.
2019-09-13 13:12:08 +09:00
Peter Barker 0ce3cd06b0 Copter: fix compilation when drift mode is disabled 2019-08-27 09:43:47 +10:00
Peter Barker b0428f0fe8 Copter: make surface_tracking a class, various functions methods 2019-08-06 14:09:09 +09:00
Michael du Breuil 242096b65e Copter: Send a heartbeat on mode change 2019-06-26 12:58:18 -07:00
Peter Barker 676d75c391 Copter: correct namespacing of Copter modes
This makes us look like Rover and Plane in terms of namespacing for the
Mode classes, and removes a wart where we #include mode.h in the middle
of the Mode class.

This was done mechanically for the most part.

I've had to remove the convenience reference for ap as part of this.
2019-06-11 09:18:22 +09:00
Pierre Kancir c2811ea144 ArduCopter: respect yaw orientation on LAND 2019-04-23 09:35:02 +09:00
Randy Mackay b7d0e4ec10 Copter: remove surface tracking shim functions 2019-04-19 07:45:52 +09:00
Randy Mackay 01909cf4c8 Copter: zigzag mode gets terrain following support 2019-04-19 07:45:52 +09:00
Randy Mackay 89eb876faf Copter: move surface tracking variables into structure 2019-04-19 07:45:52 +09:00
Randy Mackay 33a57361bd Copter: reduce args passed to get_surface_tracking_climb_rate
The same arguments are always passed in
2019-04-19 07:45:52 +09:00
Pierre Kancir caf925eda5 Copter: factorize arm or land check 2019-04-16 10:17:47 +09:00
Peter Barker 46a6f45e4a Copter: adjust for desired spool state and spool state renames 2019-04-14 12:18:03 +09:00
Peter Barker 5db75b313d Copter: use floats for roll/pitch
Otherwise we're taking floats, making them int32 and then making them
floats again when calling the attitude controller
2019-04-09 09:21:12 +09:00
Peter Barker e5b25824eb Copter: remove unused takeoff_trigger_dz parameter 2019-04-09 08:15:39 +10:00
bnsgeyer 94738c3f86 Copter: change make_safe_shut_down to make_safe_spool_down 2019-04-08 09:42:21 +09:00
Randy Mackay a6bfafefb0 Copter: move loiter and wpnav init out of make_safe_shut_down
resolves autotest RTLSpeed test failure
2019-04-08 09:42:21 +09:00
Leonard Hall 38cc5a817f Copter: consolidate mode state decisions
bnsgeyer and rmackay9 contributed to these changes

make_safe_shut_down waits for spool down before disarming
remove use of attitude_control::set_throttle_out_unstabilized to consolidate logic between multicopters and tradhelis
2019-04-08 09:42:21 +09:00
bnsgeyer d949c80d54 Copter: tradheli replaces rotor_runup_complete with spool state 2019-04-08 09:42:21 +09:00
Peter Barker 3b33f4ca4d Copter: add floating-point-constant designators 2019-04-05 23:04:17 -07:00
Peter Barker e9398e73ff Copter: tidy get_pilot_desired_throttle 2019-03-27 18:03:56 +11:00
Peter Barker c1c71fec23 Copter: move Mode functions into mode.cpp from Attitude.cpp (NFC) 2019-03-27 14:02:31 +11:00
Peter Barker 7e01d1ef50 Copter: correct compilation for ERROR_SUBSYSTEM_FLIGHT_MODE changing names 2019-03-27 13:23:12 +11:00
Peter Barker c7e21d95ef Copter: move Log_Write_Error into library 2019-03-27 12:36:40 +11:00
Peter Barker 335c1769ee Copter: do not allow change to Drift if in non-manual-throttle mode
drift acts just like stabilise or acro in terms of pilot throttle when
pilot input is maxed.
2019-03-26 20:57:15 +11:00
Peter Barker d95160b33c Copter: move check for high-throttle on mode change up 2019-03-26 20:57:15 +11:00
Peter Barker 34d9ce27af Copter: make get_pilot_desired_throttle a method on Mode 2019-03-26 20:57:15 +11:00
Patrick José Pereira 33764d6c3b Copter: Fix typo
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-03-26 15:39:23 +11:00
Peter Barker 451f5f17ce Copter: move devo telemetry handling to GCS 2019-03-19 14:39:14 +11:00
Peter Barker e22b29bce4 Copter: FrSky support has moved to GCS 2019-03-19 14:39:14 +11:00
Peter Barker 366051c39f Copter: use enum class for AltFrame enumeration 2019-03-19 10:31:18 +11:00
Peter Barker fab2d59a1c Copter: move check for position up 2019-03-01 13:43:20 +09:00
Peter Barker 2c814e9de2 Copter: get_alt_above_ground to get_alt_above_ground_cm 2019-02-26 19:31:41 +09:00
Dr.-Ing. Amilcar do Carmo Lucas 937e05bb2a Copter: small precision landing improvements 2019-02-07 10:54:58 +09:00
Peter Barker 3521d98b52 Copter: move handling Write_Event into AP_Logger 2019-02-04 09:30:07 +09:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00