Commit Graph

87 Commits

Author SHA1 Message Date
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
Andrew Tridgell b897551e0b Copter: log PIDs at full rate during AUTOTUNE twitch 2018-12-22 15:10:23 +11:00
Andrew Tridgell 89d54767b1 Copter: convert to use AC_AutoTune library
this maintains existing behaviour
2018-12-18 10:34:42 +09:00
Randy Mackay 7a6e212da9 Copter: follow return wp_distance and wp_bearing 2018-12-13 09:30:19 +09:00
Peter Barker 73940df48e Copter: move mission into mode_auto 2018-11-09 13:35:40 +09:00
Peter Barker b0494c1491 Copter: add override keyword where required 2018-11-08 11:30:12 +11:00
Peter Barker 7e581da1cf Copter: implement misson LOITER_TO_ALT 2018-10-30 17:50:46 +09:00
Peter Barker a339d77f08 Copter: let AP_Mission handle common camera commands 2018-10-30 15:37:18 +11:00
Peter Barker 1eec264d6c Copter: mission library handles gripper 2018-10-30 15:37:18 +11:00
Peter Barker 7af119b497 Copter: factor out loc_from_cmd from three functions 2018-10-16 10:17:12 +11:00
Peter Barker 26ca75efae Copter: make libraries get EKF control limits themselves 2018-10-09 10:47:38 +11:00
Randy Mackay d3f7214bcf Copter: revamp zigzag mode
more accurately stops on target
uses current z target when moving to edge
loses unnecessary auto_yaw.set_mode
ensure A and B are different
2018-10-05 10:05:45 +09:00
CAO MUQING 71beab7502 Copter: create and update Zigzag flight mode 2018-10-05 10:05:45 +09:00
Peter Barker 87f8e523de Copter: clarify takeoff comments 2018-07-27 13:08:27 +10:00
Peter Barker 22f7f29045 Copter: move all of waypoint-takeoff into Mode namespace 2018-07-27 13:08:27 +10:00
Peter Barker 11aeec6dd1 Copter: factor out auto_takeoff_run from auto and guided
This code was identical.
2018-07-27 13:08:27 +10:00
Peter Barker ff17c78c67 Copter: create Copter::Mode::_TakeOff subobject from takeoff_state 2018-06-26 09:11:21 +09:00
Peter Barker 7883582c65 Copter: move takeoff state into Mode class 2018-06-26 09:11:21 +09:00
Peter Barker 597e876953 Copter: clean up do_user_takeoff 2018-06-26 09:11:21 +09:00
Peter Barker cff1969a29 Copter: make do_user_takeoff a member of Mode 2018-06-26 09:11:21 +09:00