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
Randy Mackay
709c874d8b
Copter: integrate AP_OAPathPlanner
2019-08-17 09:42:43 +09:00
Leonard Hall
c56acb49d6
Copter: Add missing Loiter initialisation lines.
...
This command is missing to define the desired acceleration that loiter will initalise to.
loiter_nav->clear_pilot_desired_acceleration();
2019-07-20 16:40:51 +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
Peter Barker
6dce39cbe1
Copter: use AP_Arming methods to arm and disarm vehicle
...
Really just changing the namespace of init_arm_motors
2019-05-30 07:37:30 +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 Barker
7ad4d95426
Copter: do not permit RTL unless home is set
...
Rover has a similar check for entering RTL
Without this, if you do not have any rally points then we end up
attempting to manipulate an invalid location.
2019-05-29 09:04:37 +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
bnsgeyer
94738c3f86
Copter: change make_safe_shut_down to make_safe_spool_down
2019-04-08 09:42:21 +09:00
bnsgeyer
f96da56ad6
Copter: Allow safe shutdown before disarming
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
Tom Pittenger
7824b64ad6
Copter: rename dataflash to logger
2019-03-28 16:40:57 +11:00
Peter Barker
c7e21d95ef
Copter: move Log_Write_Error into library
2019-03-27 12:36:40 +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
366051c39f
Copter: use enum class for AltFrame enumeration
2019-03-19 10:31:18 +11:00
Peter Barker
281dbfcef8
Copter: support send_extended_sys_state
2019-03-12 09:16:13 +09:00
Peter Barker
7c05364612
Copter: reindent mode init functions (NFC)
2019-03-01 13:43:20 +09:00
Peter Barker
fab2d59a1c
Copter: move check for position up
2019-03-01 13:43:20 +09:00
murata
8644f4d76e
Copter: Disable option code
...
Copter: Revert change
Copter: Change mistakes
2019-02-26 10:00:00 +09:00
Peter Barker
845f015648
Copter: adjust for Location_Class and Location unification
2019-01-16 11:45:29 +11:00
Pierre Kancir
c50eed5e9a
Copter: log and notify when manual land repositionning is active
2018-11-13 10:14:54 +09:00
Peter Barker
e02a645354
Copter: use fabsf() instead of labs()
...
wrap_180_cd returns a float
substracting a float from an int32 returns a float
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
Leonard Hall
17b61f72a3
Copter: Initialise desired acceleration before loiter init
2018-09-19 08:34:08 +09:00
Peter Barker
ba8b3e2415
Copter: create an AutoYaw helper object to hold auto-yaw state
2018-04-18 13:27:43 +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
Randy Mackay
1a0be015f9
Copter: land, loiter, rtl provide dt to AC_WPNav::set_pilot_desired_acceleration
...
Also fix accelerations/lean-angles for land and rtl-land
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
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
Peter Barker
71ad1b5815
Copter: use zero_throttle_and_relax_ac 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
Randy Mackay
c3fbf2671c
Copter: rename control_xx.cpp files to mode_xx.cpp
2017-12-12 10:39:26 +09:00