Andrew Tridgell
328fff8585
Copter: fixed RC failsafe handling for no RC receiver
...
this stops us using uninitialised values in modes like circle which
can operate either with or without RC input. If we didn't have a RC
receiver attached then they would use a maximum yaw rate (which
produces quite a spectacular result for a tuned up racing quad)
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
Peter Barker
0ce3cd06b0
Copter: fix compilation when drift mode is disabled
6 years ago
Peter Barker
b0428f0fe8
Copter: make surface_tracking a class, various functions methods
6 years ago
Michael du Breuil
242096b65e
Copter: Send a heartbeat on mode change
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
Pierre Kancir
c2811ea144
ArduCopter: respect yaw orientation on LAND
6 years ago
Randy Mackay
b7d0e4ec10
Copter: remove surface tracking shim functions
6 years ago
Randy Mackay
01909cf4c8
Copter: zigzag mode gets terrain following support
6 years ago
Randy Mackay
89eb876faf
Copter: move surface tracking variables into structure
6 years ago
Randy Mackay
33a57361bd
Copter: reduce args passed to get_surface_tracking_climb_rate
...
The same arguments are always passed in
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
Peter Barker
5db75b313d
Copter: use floats for roll/pitch
...
Otherwise we're taking floats, making them int32 and then making them
floats again when calling the attitude controller
6 years ago
Peter Barker
e5b25824eb
Copter: remove unused takeoff_trigger_dz parameter
6 years ago
bnsgeyer
94738c3f86
Copter: change make_safe_shut_down to make_safe_spool_down
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
bnsgeyer
d949c80d54
Copter: tradheli replaces rotor_runup_complete with spool state
6 years ago
Peter Barker
3b33f4ca4d
Copter: add floating-point-constant designators
6 years ago
Peter Barker
e9398e73ff
Copter: tidy get_pilot_desired_throttle
6 years ago
Peter Barker
c1c71fec23
Copter: move Mode functions into mode.cpp from Attitude.cpp (NFC)
6 years ago
Peter Barker
7e01d1ef50
Copter: correct compilation for ERROR_SUBSYSTEM_FLIGHT_MODE changing names
6 years ago
Peter Barker
c7e21d95ef
Copter: move Log_Write_Error into library
6 years ago
Peter Barker
335c1769ee
Copter: do not allow change to Drift if in non-manual-throttle mode
...
drift acts just like stabilise or acro in terms of pilot throttle when
pilot input is maxed.
6 years ago
Peter Barker
d95160b33c
Copter: move check for high-throttle on mode change up
6 years ago
Peter Barker
34d9ce27af
Copter: make get_pilot_desired_throttle a method on Mode
6 years ago
Patrick José Pereira
33764d6c3b
Copter: Fix typo
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
6 years ago
Peter Barker
451f5f17ce
Copter: move devo telemetry handling to GCS
6 years ago
Peter Barker
e22b29bce4
Copter: FrSky support has moved to GCS
6 years ago
Peter Barker
366051c39f
Copter: use enum class for AltFrame enumeration
6 years ago
Peter Barker
fab2d59a1c
Copter: move check for position up
6 years ago
Peter Barker
2c814e9de2
Copter: get_alt_above_ground to get_alt_above_ground_cm
6 years ago
Dr.-Ing. Amilcar do Carmo Lucas
937e05bb2a
Copter: small precision landing improvements
6 years ago
Peter Barker
3521d98b52
Copter: move handling Write_Event into AP_Logger
6 years ago
Peter Barker
6fc76a32af
GLOBAL: use AP::logger() and strip redundant Log_ from methods
6 years ago
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
6 years ago
Peter Barker
845f015648
Copter: adjust for Location_Class and Location unification
6 years ago
Randy Mackay
50c5ad7076
Copter: TradHelis force spool up before takeoff
6 years ago
bnsgeyer
ca565675f2
Copter: Tradheli gets support for spool logic
6 years ago
bnsgeyer
12f4d8518e
Copter: Tradheli moves init_targets_on_arming flag to motors
6 years ago
Leonard Hall
2ddb3f6697
Copter: desired-ground-idle replaces spin-when-armed
6 years ago
Francisco Ferreira
a2fa63bcf7
Copter: fix Cygwin build
...
Static initialization doesn't have an exact order, we can't rely on it
6 years ago
murata
b252eae404
Copter: Flip mode is an option.
...
Copter: Flip mode is an option.
6 years ago
Pierre Kancir
c50eed5e9a
Copter: log and notify when manual land repositionning is active
6 years ago
Peter Barker
5f552a6ce3
Copter: stop shadowing members of Copter
...
These references were taken to make the breaking out of Modes in Copter.
A lot of other code has already caused these sorts of things to go away,
but these particular ones seem reasonable to fix by pointing the users
at the copter object directly.
6 years ago
Peter Barker
26ca75efae
Copter: make libraries get EKF control limits themselves
6 years ago
CAO MUQING
71beab7502
Copter: create and update Zigzag flight mode
6 years ago
Michael du Breuil
7e1ed948f5
Copter: Cope with AC_PosControl renaming
6 years ago
Peter Barker
22f7f29045
Copter: move all of waypoint-takeoff into Mode namespace
7 years ago