Commit Graph

105 Commits

Author SHA1 Message Date
Peter Barker 5ae52038fa Copter: make setting of home boolean in preparation for sanity checks 2019-02-15 08:28:45 +11:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Peter Barker 73940df48e Copter: move mission into mode_auto 2018-11-09 13:35:40 +09:00
Peter Barker ac0e126099 Copter: correct AFS terminate-via-land for Copter
In the case we're terminating via land it's a good idea to continue to
constantly adjust our motor outputs for stabilization and the like....
2018-10-01 11:23:46 +09:00
Randy Mackay 71334a18c5 Copter: rename rudder_arming to get_rudder_arming_type 2018-09-11 19:34:39 +10:00
Randy Mackay 72234e5db6 Copter: arming check formatting fixes 2018-09-11 19:34:39 +10:00
Randy Mackay ede27b23d9 Copter: support disabling rudder arming 2018-09-11 19:34:39 +10:00
Peter Barker 0f4c68aadb Copter: move rc-channel option for lost-vehicle sound up to base class 2018-09-03 16:57:25 +09:00
Peter Barker e7e56dde7a Copter: move handling of RC switches into RC_Channel 2018-08-01 12:11:30 +09:00
Peter Barker df83cb034e Copter: use ArmingMethod enumeration 2018-07-03 15:16:38 +10:00
Peter Barker fd9ce90b8e Copter: option to force arm, bypassing checks 2018-06-20 11:43:38 +10:00
Peter Barker e3ddf7dadd Copter: rename SPRAYER-enabled-define to SPRAYER_ENABLED 2018-06-01 15:13:05 +09:00
Peter Barker c09ccf5b61 Copter: split home-set and home-locked state 2018-05-29 14:38:45 +10:00
Andrew Tridgell 2425c65e74 Copter: implement 'air-mode' for copter
this implements what betaflight calls 'air-mode'. This gives attitude
control when throttle is at zero, allowing for zero-throttle maneuvers,
plus keeping the copter level on the ground.

This was already implemented if an interlock switch was setup, but it
should also work with an arming switch. If using an arming switch then
throttle should not be considered zero as long as the arming switch
hasn't gone low.
2018-05-29 10:27:14 +09:00
Michael du Breuil 291531e056 Copter: Support new battery failsafes 2018-03-27 22:12:21 +01:00
Peter Barker 45f2312bfe Copter: move home state into AP_AHRS 2018-03-19 10:32:37 +09:00
Peter Barker 9b440d6b25 Copter: add option to disable SmartRTL mode
Saves 5.5k of Flash
2018-02-27 07:43:13 +09:00
Peter Barker b9ad2bc8db Copter: add option to disable AUTO mode
Saves ~12k of flash
2018-02-27 07:43:13 +09:00
Peter Barker 80a3d63264 Copter: use AP_Scheduler's loop() function 2018-02-13 17:15:05 +11:00
Peter Barker 40d74584ac Copter: remove shims used in scheduler 2018-02-12 11:19:34 +09: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
Dylan Herman c772e2d3fd Copter: sets SmartRTL home after AHRS home is set
Now calls AP_SmartRTL::set_home when arming. In addition, it calls it whenever
the ahrs home is set to the current location, whether by GCS or in-flight

Copter: merge
2018-01-17 11:04:46 +09:00
Randy Mackay 2d23e1f7c7 Copter: rename flightmode_ objects to mode_ 2017-12-12 10:39:26 +09:00
Peter Barker 5d33cf08e1 Copter: eliminate calc_home_distance_and_bearing
Calling update_simple_mode_bearing calls get-heading
rather than the other way around

This will have the advantage of not calculating home bearing
when we stop calling update_simple_mode_bearing unnecesarily
2017-12-09 16:26:09 +09:00
Peter Barker 103e2cc711 Copter: calculate wp bearing and distance on demand
Move responsibility for calculating wp bearing/distance
into the FlightMode object doing the navigation

Calculating these variables was being done at 50Hz where they
were used at 10Hz max.
2017-12-07 07:43:08 +09:00
Peter Barker 4ae2be55aa Copter: fix up autotune namespacing
This moves static variables into the autotune flightmode object.

It also adjusts namespacing on everything to take advantage of
having everything encapsulated in the AutoTune object
2017-12-07 07:35:37 +09:00
Peter Barker 7b637334f4 Copter: eliminate mode_has_manual_throttle 2017-12-06 10:09:58 +09:00
Peter Barker 67063d6b1e Copter: FlightMode - convert AUTOTUNE flight mode 2017-12-06 08:24:24 +09:00
Andrew Tridgell 23b20307af Copter: use cork/push wrapper 2017-11-21 14:10:54 +11:00
Peter Barker 04c9e966e0 Copter: use AP::PerfInfo library 2017-11-16 15:31:53 +00:00
Randy Mackay 44a436642b Copter: complete rename to SmartRTL
Also fix parameter description for CH7_OPT
2017-09-15 08:58:14 +09:00
squilter 4b57a4a231 Copter: rename SafeRTL to SmartRTL 2017-09-09 14:05:41 +09:00
squilter ba0e08552f Copter: add SafeRTL flight mode 2017-09-09 14:05:41 +09:00
squilter f7a00b911e Copter: minor format fix for motors.cpp 2017-07-31 17:27:15 +09:00
Peter Barker f60389d4aa Copter: use send_text method on the GCS singleton 2017-07-09 17:17:29 -04:00
Peter Barker d36e8fa51e Copter: eliminate calls to manipulate _writes_enabled 2017-06-11 20:34:12 +01:00
Randy Mackay 814cadac68 Copter: consolidate set_home functions
added lock argument instead of having twice as many functions
no functional change
2017-06-07 13:01:38 +09:00
Andrew Tridgell 2ba6e7af35 Copter: fixed aux servos in RC failsafe
we should always output to channels
2017-05-01 14:32:18 +10:00
Andrew Tridgell ebde6e1ce3 Copter: output any servo channels on motor output
if we have any auxillary servo channels we need to calculate the
output value
2017-04-18 09:34:42 +09:00
Peter Barker bd6ffc025e Copter: start conversion to AP_Arming_Copter 2017-01-17 11:45:08 +09:00
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
2017-01-12 17:39:37 +11:00
Andrew Tridgell 5a87ae3f01 Copter: use new SRV_Channels API 2017-01-12 17:39:37 +11:00
Randy Mackay 742cdf6b13 Copter: fix arming while armed bug
If a mavlink command was sent to arm the vehicle while it was already armed, the in_arm_motors boolean was left as true meaning the vehicle could never be armed again using a mavlink message.  This resolves issue #5546.
2017-01-11 21:38:22 +09:00
Randy Mackay 5135a11fbc Copter: protect against arming while already armed
Previously it was possible to arm the vehicle (from the GCS) even thought the vehicle was already armed which would lead to the motors stopping for 2 seconds
2016-12-01 10:24:53 +09:00
Peter Barker f9802204df Copter: inform dataflash of vehicle arm state 2016-11-28 09:42:09 -08:00
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.
2016-10-24 09:42:01 -02:00
Andrew Tridgell f18e0dadc9 Copter: added optional AdvancedFailsafe for copter and heli 2016-08-25 14:14:18 +10:00
Jonathan Challinger 80f3541933 Copter: add configurable arming delay 2016-08-04 15:19:22 +09:00
Andrew Tridgell 7e1ef905d3 Copter: removed 30ms delay on arming
this is the last of the delays that can cause the EKF to get unhappy
on arming in copter. The comment says it is waiting for RC input, but
I don't think that makes any sense any more.
2016-05-24 15:42:53 +10:00