Commit Graph

106 Commits

Author SHA1 Message Date
Matt Lawrence cb9ea6f502 Copter: Circle mode pilot control of rate & radius
RC pitch stick controls circle mode radius.  RC roll stick controls circle mode rate (speed) and direction.
2020-01-07 11:56:59 +09:00
Randy Mackay 945e34639c Copter: use SID_AXIS to hide other SystemID mode params 2019-12-16 14:09:48 +09:00
Gone4Dirt 36ed12073c Copter: Added autorotation flight mode and support 2019-12-16 14:05:14 +09:00
Michael du Breuil b42b1c08c4 Copter: Support new AP_Vehicle::set_mode 2019-10-25 08:48:22 +08:00
Randy Mackay 2cb3e446ab Copter: systemid mode formatting and name changes 2019-10-16 08:17:09 +09:00
Leonard Hall c11f2247eb Copter: System ID mode 2019-10-16 08:17:09 +09:00
Leonard Hall 91be844b66 Copter: Let modes stop Attitude Logging 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
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
Tom Pittenger 0983a04d52 Copter: NAV_Delay variable timers to be all unsigned and labeled as _ms 2019-08-19 15:24:06 -07:00
Randy Mackay 709c874d8b Copter: integrate AP_OAPathPlanner 2019-08-17 09:42:43 +09:00
Leonard Hall 0e34d8b1ff Copter: PosHold fix for low brake_rate 2019-07-18 11:13:51 +09:00
Randy Mackay b7a748df88 Copter: auto's wp_start accepts terrain alts 2019-07-18 09:01:09 +09:00
Rishabh 00f6dc9b05 Copter: brake moved in from AC_WPNav 2019-06-13 09:02:46 +09: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
Bill Geyer 0c64cdc565 Copter: TradHeli - add virtual flybar to heli acro flight mode 2019-06-04 09:57:13 +09:00
Peter Barker 08a18d6a0a Copter: avoid working with uninitialised home location 2019-05-29 09:04:37 +09:00
Peter Barker d34c4b01f4 Copter: build return path in run() rather than init()
This avoids attempting to build a return path if we don't currently have
a home or origin
2019-05-29 09:04:37 +09:00
Peter Hall 3fe63d5bc0 Copter: only save autotune gains if disarmed in autotue 2019-05-07 09:23:50 +10:00
Peter Barker 37c07e1d89 Copter: use enum class for roll/pitch mode
This adds some type-safety and helps distinguish between the many
defines which are used within PosHold mode

Saves about 210 bytes of flash
2019-04-30 08:36:59 +09:00
Peter Barker 462d87e5d0 Copter: remove unused PosHoldModeState enumeration 2019-04-30 08:36:59 +09:00
Peter Barker e28c6b9dc6 Copter: remove redundant poshold_ prefix on PosHold methods 2019-04-30 08:36:59 +09:00
Peter Barker f57a9f11cc Copter: move poshold state variables into mode object
This was simply moving the members from the poshold struct into the
class then mechanically removing poshold. from in front of the member
access.
2019-04-30 08:36:59 +09:00
Randy Mackay 8a5141f751 Copter: mode autoyaw lower in mode.h
make ordering of some declarations consistent across child classes
2019-04-20 10:04:33 +09:00
Peter Barker 7945c1fdfd Copter: mode class unfriends everyone, make relevant methods public 2019-04-20 10:04:33 +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 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 ef334fe3c7 Copter: remove hanging method declaration 2019-04-09 08:15:39 +10:00
Peter Barker 85be2b0c8b Copter: clean up flip state enumerations
... including a redundant definition of the states...
2019-04-08 14:24:19 +09:00
bnsgeyer 94738c3f86 Copter: change make_safe_shut_down to make_safe_spool_down 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
Peter Barker 3b33f4ca4d Copter: add floating-point-constant designators 2019-04-05 23:04:17 -07: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
Peter Barker 281dbfcef8 Copter: support send_extended_sys_state 2019-03-12 09:16:13 +09:00
Peter Barker e744df585c Copter: avoid int32_t<->float conversions 2019-03-01 12:09:58 +11:00
Randy Mackay 384bca9482 Copter: stop at waypoint depending upon next command 2019-02-27 13:30:40 +09:00
Randy Mackay a903c91c40 Copter: remove unused auto_spline_start declaration 2019-02-27 13:30:40 +09:00
Peter Barker 2c814e9de2 Copter: get_alt_above_ground to get_alt_above_ground_cm 2019-02-26 19:31:41 +09:00
Arjun Vinod d02d897928 Copter: make LOITER_TIME send "Reached command" message to GCS 2019-02-26 10:19:37 +09:00
Randy Mackay ee6fd5ad8d Copter: Guided_NoGPS does not require GPS 2019-02-06 12:28:08 +09:00
Peter Barker f4f40f749b Copter: Flip: fix FIXME by moving state into mode class 2019-02-04 11:07:28 +09:00
Peter Barker 3521d98b52 Copter: move handling Write_Event into AP_Logger 2019-02-04 09:30:07 +09:00
Peter Barker 845f015648 Copter: adjust for Location_Class and Location unification 2019-01-16 11:45:29 +11:00
Randy Mackay 50c5ad7076 Copter: TradHelis force spool up before takeoff 2019-01-15 11:41:44 +09:00
bnsgeyer 12f4d8518e Copter: Tradheli moves init_targets_on_arming flag to motors 2019-01-15 11:41:44 +09:00
Peter Barker bba3546279 Copter: do not permit copying of a Mode 2019-01-03 13:35:33 +09:00
Andrew Tridgell cc4db3e458 Copter: implement get_wp() for follow
this allows the GCS to plot the position target
2018-12-31 09:53:20 +09:00