Michael du Breuil
b42b1c08c4
Copter: Support new AP_Vehicle::set_mode
5 years ago
Peter Barker
a1ce8dafb0
Copter: wrap_180_cd no longer returns floats for integer arguments
5 years ago
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.
5 years ago
Randy Mackay
709c874d8b
Copter: integrate AP_OAPathPlanner
6 years ago
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();
6 years ago
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.
6 years ago
Peter Barker
6dce39cbe1
Copter: use AP_Arming methods to arm and disarm vehicle
...
Really just changing the namespace of init_arm_motors
6 years ago
Peter Barker
08a18d6a0a
Copter: avoid working with uninitialised home location
6 years ago
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
6 years ago
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.
6 years ago
Pierre Kancir
caf925eda5
Copter: factorize arm or land check
6 years ago
Peter Barker
46a6f45e4a
Copter: adjust for desired spool state and spool state renames
6 years ago
bnsgeyer
94738c3f86
Copter: change make_safe_shut_down to make_safe_spool_down
6 years ago
bnsgeyer
f96da56ad6
Copter: Allow safe shutdown before disarming
6 years ago
Randy Mackay
a6bfafefb0
Copter: move loiter and wpnav init out of make_safe_shut_down
...
resolves autotest RTLSpeed test failure
6 years ago
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
6 years ago
Tom Pittenger
7824b64ad6
Copter: rename dataflash to logger
6 years ago
Peter Barker
c7e21d95ef
Copter: move Log_Write_Error into library
6 years ago
Patrick José Pereira
33764d6c3b
Copter: Fix typo
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
6 years ago
Peter Barker
366051c39f
Copter: use enum class for AltFrame enumeration
6 years ago
Peter Barker
281dbfcef8
Copter: support send_extended_sys_state
6 years ago
Peter Barker
7c05364612
Copter: reindent mode init functions (NFC)
6 years ago
Peter Barker
fab2d59a1c
Copter: move check for position up
6 years ago
murata
8644f4d76e
Copter: Disable option code
...
Copter: Revert change
Copter: Change mistakes
6 years ago
Peter Barker
845f015648
Copter: adjust for Location_Class and Location unification
6 years ago
Pierre Kancir
c50eed5e9a
Copter: log and notify when manual land repositionning is active
6 years ago
Peter Barker
e02a645354
Copter: use fabsf() instead of labs()
...
wrap_180_cd returns a float
substracting a float from an int32 returns a float
6 years ago
Peter Barker
26ca75efae
Copter: make libraries get EKF control limits themselves
6 years ago
Leonard Hall
17b61f72a3
Copter: Initialise desired acceleration before loiter init
6 years ago
Peter Barker
ba8b3e2415
Copter: create an AutoYaw helper object to hold auto-yaw state
7 years ago
Randy Mackay
59e4749fd0
Copter: integrate AC_Loiter
...
includes param conversion
7 years ago
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
7 years ago
Ebin
d8f56b3511
ArduCopter: changed signature for get_pilot_desired_lean_angles()
...
Removes first two redundant input parameters, makes fn non static, makes fn const
7 years ago
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
7 years ago
Leonard Hall
9544b1763b
Copter: replace smoothing gain with AC_AttitudeControl::set_input_tc
7 years ago
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
7 years ago
Peter Barker
71ad1b5815
Copter: use zero_throttle_and_relax_ac function
7 years ago
Peter Barker
d9235d3d41
Copter: make landing_gear_should_be_deployed a base-class method
7 years ago
Randy Mackay
c3fbf2671c
Copter: rename control_xx.cpp files to mode_xx.cpp
7 years ago
Randy Mackay
06fbe8f3a7
Copter: rename FlightMode class to Mode
...
also remove unused print_FlightMode method
7 years ago
Peter Barker
682f3c0e7e
Copter: FlightMode - convert RTL flight mode
7 years ago
Randy Mackay
8d6d09169f
Copter: rtl uses labs for alt comparison
7 years ago
Peter Barker
5b793252ed
Copter: stop disarming as part of running rtl as mission item
...
Fixed #6324
Note that the land-as-mission-item code is duplicated from the
rtl-as-mode code but omits the disarm part, so doesn't suffer from the
same bug.
7 years ago
Peter Barker
f60389d4aa
Copter: use send_text method on the GCS singleton
8 years ago
Randy Mackay
65e97a9503
Copter: rtl initialises wp controller earlier
...
We need to initialise wp controller or the build_path could use the wrong speeds and accelerations when calculating the origin (aka stopping point)
8 years ago
Jacob Walser
868be023ee
Copter: Refactor fence.get_safe_alt() to fence.get_safe_alt_max()
8 years ago
Peter Barker
cc86011d20
Copter: use abs() on integers; Location alts are in integer cm
8 years ago
Andrew Tridgell
0f6d0c5ba9
Copter: combined tri, single, coax and multicopter into a single build
...
this allows copter to be just 2 builds, one for heli, and one for
everything else
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Randy Mackay
5894a54a16
Copter: althold uses current alt target if active
...
Previously we always reset the altitude target to the current altitude but this causes a jump if the vehicle is already in an alt-hold flight mode but has an altitude error
8 years ago