Randy Mackay
54582814aa
Copter: use SID_AXIS to hide other SystemID mode params
2019-12-03 14:53:55 +08:00
Peter Barker
2296448027
Copter: make private enum class for LAND mode's state
2019-12-03 07:38:22 +08:00
Gone4Dirt
180d4e713c
Copter: Added autorotation flight mode and support
2019-11-29 08:06:10 +08: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
Peter Barker
5ece75a09a
Copter: AC_AutoTune writes events itself now
2019-11-01 14:47:52 +08: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
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
Peter Barker
cb26ff64b3
Copter: current_mode_has_user_takeoff -> Mode::has_user_takeoff
2018-06-26 09:11:21 +09:00
Pierre Kancir
2d5cbd2cf8
ArduCopter: report crosstrack_error
2018-06-26 08:42:14 +09:00
Peter Barker
7c8583d51d
Copter: implement sending of position_target_global_int
2018-05-18 20:26:37 +10:00
Pierre Kancir
3be6c0e26b
ArduCopter : clean unused definitions
2018-04-20 15:26:47 +01:00
Peter Barker
948b90ed97
Copter: rename roi_WP to just roi
...
A Vector3f is not a waypoint.
This should really be "Point Of Interest" rather than "Region Of
Interest"
2018-04-18 13:27:43 +09:00
Peter Barker
ba8b3e2415
Copter: create an AutoYaw helper object to hold auto-yaw state
2018-04-18 13:27:43 +09:00
Peter Barker
80549a479e
Copter: move throw logging into ModeThrow
2018-04-17 17:16:52 +09:00
Leonard Hall
83fac326a4
Copter: autotune check for vel overshoot in angle P
...
this change reduces the chance of over tuned angle P
2018-04-06 14:48:28 +09:00
Randy Mackay
59e4749fd0
Copter: integrate AC_Loiter
...
includes param conversion
2018-04-04 10:45:10 +09:00
Ebin
1ff4019ddf
ArduCopter: moved landing control fns from Copter to Mode
...
land_run_horizontal_control(),land_run_vertical_control(),get_alt_above_ground() moved to Mode
2018-03-29 16:50:00 +01:00
Ebin
d8f56b3511
ArduCopter: changed signature for get_pilot_desired_lean_angles()
...
Removes first two redundant input parameters, makes fn non static, makes fn const
2018-03-19 17:51:39 +09:00
Leonard Hall
93de23e7c4
Copter: get-pilot-desired-lean-angles accepts another angle-max
2018-03-16 13:50:57 +09:00
Leonard Hall
9544b1763b
Copter: replace smoothing gain with AC_AttitudeControl::set_input_tc
2018-03-16 13:50:57 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
b27c00dc5f
Copter: add option to disable ACRO mode
2018-03-15 07:38:14 +09:00
Randy Mackay
af207caa1f
Copter: move get_pilot_desired_lean_angles higher in cpp
...
this makes the definition in the .h and implementation in .cpp files appear in the same order
2018-03-14 09:33:39 +09:00
Ebin
20995b909f
Copter: Moved get_pilot_desired_lean_angles to mode.cpp
2018-03-14 09:33:39 +09:00
Peter Barker
af56826107
Copter: follow mode fixups
...
add follow to FLTMODEx param descriptions
remove follow's set_velocity method
10hz logging of desired velocity in follow mode
follow mode uses pos error P gain
add send-debug-via-mavlink option
don't enter follow if follow lib is disabled
follow debug slowed to 1hz
disable follow on min-features builds
2018-03-05 15:08:08 +09:00
Randy Mackay
6ee101ca98
Copter: rename chase to follow
2018-03-05 15:08:08 +09:00
Randy Mackay
053983eb70
Copter: integrate AP_Follow into chase mode
2018-03-05 15:08:08 +09:00
Peter Barker
199455dc56
Copter: add chase mode
2018-03-05 15:08:08 +09:00
Peter Barker
eb9bbddcb7
Copter: add in_guided_mode mode callback
2018-02-27 07:43:13 +09:00
Peter Barker
06da2f50ce
Copter: correct compilation when logging is disabled
2018-02-22 10:25:39 +10:00
Peter Barker
e6ece4cf3d
Copter: correct use of parent class constructors (heli)
2018-02-13 08:22:30 +09:00
Andrew Tridgell
7938bd08bb
Copter: make flowhold mode conditional
...
reduces build size on px4-v2 by 4k
2018-02-12 13:34:47 +09:00
murata
c31c2a4cf1
Copter: optionalize the winch
2018-02-12 12:16:57 +09:00
Peter Barker
8f8917369c
Copter: correct use of parent class constructors
2018-02-09 13:41:12 +11:00
Peter Barker
5e55784707
Copter: remove unneeded and unwanted virtual keywords
2018-02-09 09:11:04 +09:00
Randy Mackay
4319e37f0c
Copter: non-functional FlowHold changes
...
class declaration moved to alphabetical position in mode.h
parameter descriptions include FlowHow at beginning to help distinguished from optical flow parameters
resolved compiler warnings
2018-02-09 10:56:32 +11:00
Andrew Tridgell
0ed75052f8
Copter: enable parameters inside mode objects
...
this adds FHLD_* parameters for FlowHold mode. It is a large patch as
it needs to disentagle the mode class to enable it to be used in
Parameters.h
2018-02-08 17:36:33 +11:00
Andrew Tridgell
af4f0c29ba
Copter: enable TMODE (ToyMode) support
...
this is for the skyviper button based transmitter control
2018-02-08 17:36:33 +11:00
Andrew Tridgell
f442b91ea5
Copter: added FLOWHOLD flight mode
...
This flight mode allows for position hold with optical flow without
needing a rangefinder for height. It can estimate its height from the
flow data and IMU
2018-02-08 17:36:33 +11:00
Peter Barker
a97301c0f2
Copter: do not allow arming in RTL
2018-01-25 09:53:51 +09:00
Peter Barker
41dc8554c0
Copter: pull out a zero_throttle_and_relax function
2017-12-27 12:09:06 +00:00
Peter Barker
d9235d3d41
Copter: make landing_gear_should_be_deployed a base-class method
2017-12-27 12:08:15 +00:00
Peter Barker
bf5f51a616
Copter: factor out takeoff_trigger from althold, sport and loiter
2017-12-14 23:45:54 +00:00
Peter Barker
6c82f7671d
Copter: move all commands logic into AUTO flightmode
2017-12-14 14:08:01 +09:00
Randy Mackay
c3fbf2671c
Copter: rename control_xx.cpp files to mode_xx.cpp
2017-12-12 10:39:26 +09:00