Commit Graph

245 Commits

Author SHA1 Message Date
Randy Mackay
7cc8a9038f Copter: move failsafe flags into structure 2013-09-26 19:37:15 +09:00
Randy Mackay
77b5cb5d3f Copter: correct typo in error #define 2013-09-24 21:45:52 +09:00
Randy Mackay
284aa2217f Copter: remove old comments 2013-09-24 21:45:43 +09:00
Andrew Tridgell
faddef69e6 Copter: fixed baud rates on APM1 2013-09-21 09:30:29 +10:00
Andrew Tridgell
46688454c4 Copter: removed flash_leds() calls 2013-09-19 18:38:28 +10:00
Andrew Tridgell
754bdbd25f Copter: use new usb_connected() HAL function 2013-09-19 16:24:23 +10:00
Randy Mackay
98a2ffd65c Copter: remove redundant reset_i_all from startup 2013-09-13 12:30:25 +09:00
Andrew Tridgell
7c62736e59 Copter: fixed Vcc 2013-09-12 13:26:19 +10:00
Randy Mackay
1abb439051 Copter: move acro's var initialisation to roll-pitch and yaw controller initialisation 2013-09-09 10:54:13 +09:00
Randy Mackay
942ba0476b Copter: remove manual_attitude and throttle flags 2013-09-09 10:44:53 +09:00
Randy Mackay
b7579bb028 Copter: move init of global nav variables to set_nav_mode 2013-09-09 10:37:44 +09:00
Andrew Tridgell
979636936d Copter: support reboot to bootloader 2013-09-04 11:59:02 +10:00
Randy Mackay
e985253f1a Copter: integrate notify 2013-08-30 13:01:35 +10:00
Randy Mackay
7159c539e6 Copter: skip mode change checks when disarmed
Note: there will be a follow up commit to move the checks into a
separate function so they can be called just before arming
2013-08-22 13:25:27 +09:00
Randy Mackay
e32342163d Copter: rename ACRO variables 2013-08-05 21:04:50 +09:00
Randy Mackay
39ab4f62ef Copter: add SPORT mode 2013-08-05 21:04:41 +09:00
Randy Mackay
12da2d160a Copter: set landing_complete flag to false on start-up 2013-07-28 18:19:03 +09:00
Randy Mackay
c3daf78340 Copter: reset loiter target when landed 2013-07-28 18:18:41 +09:00
Randy Mackay
7ea971d948 Copter: check set_mode for failure
Previously if set_mode failed it would return the copter to stabilize
mode.  With this commit set_mode returns a true/false indicating whether
it succeeded or not so the caller can make the decision as to the
appropriate response which could be to stay in the current flight mode
or try another flight mode.
2013-07-20 11:01:10 +09:00
Randy Mackay
41ba4a1ed2 Copter: initialise ch7 and ch8 aux switches
This ensures that if you have simple mode or sonar attached to an
auxiliary switch it will be enabled or disabled according to the switch
immediately after start-up
2013-07-16 22:05:59 +09:00
Leonard Hall
64ce9b017d Copter: Body frame ACRO upgrade 2013-07-11 17:53:25 +09:00
Randy Mackay
345924ddec WPNav: replace LOITER_ACCEL_MAX with parameter
Also removed unused _lean_angle_max variable
2013-07-10 20:00:32 +09:00
Randy Mackay
022148ec0d Copter: LAND only control horizontal position if we have GPS lock 2013-06-25 22:34:58 +09:00
Randy Mackay
993bccc60e Copter: point nose at landing point if specified 2013-06-03 15:20:37 +09:00
Olivier-ADLER
68470c9176 Copter : Land submode - Check for GPS 3D Fix instead of checking for available home position 2013-06-02 11:49:12 +09:00
Dr Gareth Owen
f175111243 added GPS check before mode change. New mode_requires_gps() function. 2013-05-30 20:33:15 +09:00
Randy Mackay
d1791bab76 Copter: fix barometer cli test 2013-05-25 12:21:29 +09:00
Randy Mackay
885ce7db03 Copter: remove DigitalReadFast
With APHal all reads are fast
2013-05-20 11:29:34 +09:00
Randy Mackay
9d0f40b432 Copter: add pre_arm_rc_check
Motors are not be enabled unless we have passed rc checks which include
checking the radio in calibration has been performed.
2013-05-16 16:32:00 +09:00
Randy Mackay
98732ae4e8 Copter: remove redundant init of controllers when auto is started
individual do_* commands are responsible for setting roll-pitch, yaw and
throttle modes.  Removing this redundant setting of the controllers
removes the short period (10th second max) where loiter and waypoint
controller's desired roll and pitch were used even before the
controllers have been run once.
2013-05-10 10:51:13 +09:00
Randy Mackay
cca05ee8ae Copter: start dataflash logging when arming
Stop nearly empty logs from being produced.
Removed redundant armed bit from ap state.
2013-05-03 14:49:55 +09:00
Randy Mackay
58d1da2d80 Copter: integrate AC_Fence in place of limits
Lesser functionality than limits but saves more than 150 bytes and it
works
2013-04-27 11:14:07 +09:00
Andrew Tridgell
82c604dd67 Copter: more constrain fixes 2013-04-22 13:26:49 +10:00
Randy Mackay
a53e5f747b Copter: add fourth yaw behaviour, look-at-home
Added get_wp_yaw_mode to remove duplication of checks of the
WP_YAW_BEHAVIOR parameter
2013-04-20 15:36:24 +09:00
Andrew Tridgell
02c3083f60 Copter: print flight mode as string 2013-04-20 15:18:22 +10:00
Andrew Tridgell
a0708460a4 Copter: convert to new logging system 2013-04-20 13:52:37 +10:00
Randy Mackay
d2bd818b2d Copter: bug fix for auto_armed logic
Zero throttle when switching into an auto flight mode would cause the
motors to stop.
2013-04-17 21:28:42 +09:00
Randy Mackay
f82ce449d7 AC_WPNav: add angle limits and set from AC's throttle controller 2013-04-14 10:38:34 +09:00
Randy Mackay
1516972eaa Copter: add panorama to CIRCLE mode
Yaw will slowly rotate if CIRCLE_RADIUS is set to zero
Circle center is projected forward CIRCLE_RADIUS from current position
and heading
2013-04-14 10:38:01 +09:00
Randy Mackay
58ed8cd544 Copter: replace set_next_WP with direct call to wp_nav 2013-04-14 10:37:55 +09:00
Randy Mackay
49828eba7d Copter: integrate AC_WPNav 2013-04-14 10:37:48 +09:00
Randy Mackay
d1afd2fb9b Copter: make guided mode start at current location 2013-04-03 23:06:46 +09:00
Randy Mackay
7cf2255822 Copter LEDs: replace bitRead with bitmask
Consolidate all checks of led_mode to leds.pde
Add #defines for bitmasks comparisons
Some formatting changes
2013-04-01 13:10:12 +09:00
Randy Mackay
80bd593814 Copter: disarm motors when entering CLI 2013-03-21 12:07:00 +09:00
Randy Mackay
dcf21eee8f Copter: only allow entering the CLI within 30 seconds of start-up 2013-03-21 11:54:04 +09:00
Andrew Tridgell
952c56e990 Copter: fixed barometer init in HIL sensors mode 2013-03-18 16:20:25 +11:00
Randy Mackay
36834e77b5 Copter: remove support for CLI Slider 2013-03-18 14:07:04 +09:00
Randy Mackay
f9539384a1 Copter: rename failsafe to failsafe_radio
Makes way for separation of failsafes for throttle, gps and gcs
2013-03-16 17:14:21 +09:00
Randy Mackay
0d5e731a65 Copter: add compassmot to cli
Allows user to setup compensation for motor's interference on the
compass
2013-03-02 17:54:18 +09:00
Randy Mackay
cbde042ec5 Copter: remove non-inav loiter and wp controllers
lon_speed, lat_speed changed to float
do_takeoff, do_land now set roll-pitch, yaw and nav modes specifically
removed fast_corners functionality (may need to be reimplemented with
new inertial nav controllers)
2013-02-24 14:41:52 +09:00