Commit Graph

213 Commits

Author SHA1 Message Date
Robert Lefebvre
07d7d90882 ACM: TradHeli
Bringing in Low Pass Filter for Rate Controllers
2012-11-26 21:51:23 -05:00
Robert Lefebvre
3f0e8dd358 ACM: TradHeli
Bringing in Low Pas Filter
Commented out because it does not build.
Needs updates to Low Pass Filter Lib
2012-11-26 21:21:12 -05:00
Andrew Tridgell
f6ec932d63 Copter: added reboot in CLI and over MAVLink
useful for getting out of CLI
2012-11-24 18:20:37 +11:00
Andrew Tridgell
bcae83c4f6 ACM: make it possible to run CLI on radio port in ArduCopter 2012-11-21 21:41:34 +11:00
Michael Oborne
a5e3ce4655 remove cli planner mode - no longer used 2012-11-21 07:45:45 +08:00
rmackay9
07a7a1acd8 ArduCopter: replaced digitalRead and digitalWrite with faster calls
improved performance logging to dataflash
2012-11-19 01:16:07 +09:00
rmackay9
bcb9519fd7 ArduCopter: renamed system bitmap to ap_system to resolve desktop compile issues 2012-11-11 22:42:10 +09:00
Jason Short
d2a5928c06 Ap state updates 2012-11-09 22:15:15 -08:00
rmackay9
1f801714e8 ArduCopter: incorporate new version of inertial navigation
Moved several navigation functions from ArduCopter.pde to navigation.pde
2012-11-07 19:21:31 +09:00
rmackay9
a1b4ec6d0e ArduCopter: move to use new INS library instead of IMU library 2012-11-07 19:21:09 +09:00
Jason Short
e138b0a1d7 ACM: Added simple mode bearing logging for bug hunting 2012-10-28 12:12:38 -07:00
Jason Short
1713279ace ACM: Formatting 2012-10-27 14:13:46 -07:00
rmackay9
cebcc226ee ArduCopter: change TOY_M throttle mode to THROTTLE_HOLD 2012-10-26 10:56:06 +09:00
rmackay9
78316adf75 ArduCopter: replace Serial.print with Serial.print_P to save memory.
Includes replacing flight_mode_strings with print_flight_mode function.
SendDebug macro replaced with direct Serial.print_P calls.
2012-10-22 16:45:24 +09:00
Jason Short
a0752dc7dc ACM Acceleration management
removed unused waypoint_radius var
removed slow_wp
updated speed management system to maintain a constant acceleration or deceleration of 1m/s
changed version to 2.8.1a
2012-10-21 14:32:39 -07:00
Robert Lefebvre
592f4040fd Changed RLT Yaw Mode for TradHeli. Also a few comment cleanups. 2012-10-18 16:39:05 -04:00
rmackay9
a2a3eed063 ArduCopter: bug fix for telemetry not working on APM1.
SPI3 is also UART3.  On APM1 we use UART3 for telemetry and don't need SPI3.
2012-10-18 19:15:21 +09:00
rmackay9
997fe85880 ArduCopter: fixed acro mode
Changes included:
Removing earth frame roll_rate_trim, pitch_rate_trim and yaw_rate_trim.
Switch ACRO mode to use YAW_ACRO instead of YAW_HOLD.
Changed YAW_ACRO to use stabilize yaw when axis_enabled.
Reset ACRO roll, pitch and yaw targets to current attitude when first entering ACRO.
2012-10-14 17:47:46 +09:00
rmackay9
c0ad98be31 ArduCopter: failsafe added to shutdown motors if mainloop fails 2012-10-09 12:30:17 +09:00
rmackay9
95763e610b ArduCopter: allow DMP to run in parallel with DCM
Parallel DMP can be enabled by #define SECONDARY_DMP_ENABLED in APM_Config.h
New DMP dataflash log type added to allow easy comparison with DCM
2012-09-30 00:25:40 +09:00
rmackay9
8c6fd340d7 AP_AHRS: added scheduler parameter to init
Required by the AP_AHRS_MPU6000 class which needs to disable timed processes that could interfere with it's communication with the mpu6000
2012-09-29 13:51:21 +09:00
rmackay9
b2f12c4854 ArduCopter: optical flow initialisation changes now that optical flow library automatically works on APM1, APM2 and APM2.5 2012-09-24 18:39:33 +09:00
Andrew Tridgell
5fd39bb928 ACM: updates for new GPS detection
a GPS can now be attached after startup
2012-09-17 14:45:47 +10:00
rmackay9
303ca11c4c HIL: changes to fix HIL for ArduCopter after recent timing changes.
Changes include using AP_PeriodicProcess and calling imu.init even in HIL mode
2012-09-15 18:42:56 +09:00
rmackay9
b6d2d4723f ArduCopter: print firmware version of code instead of zero. 2012-09-13 21:49:11 +09:00
rmackay9
2e9e3ce5a6 ArduCopter: increase SPI bus speed to 2Mhz after IMU initialisation has completed (MPU6000 accepts maximum of 1Mhz for some registers but up to 20Mhz for main sensor and interrupt registers) 2012-08-28 17:29:48 +09:00
uncrustify
969166c4e3 uncrustify ArduCopter/system.pde 2012-08-21 19:19:50 -07:00
Andrew Tridgell
1b0f5ac84f ACM: use ahrs.set_fast_gains() on arm/disarm 2012-08-21 15:38:31 +10:00
Jason Short
1e0ab8768e ACM: Toy mode updates 2012-08-11 22:37:26 -07:00
Jason Short
f641c5d077 ACM system.pde - toy mode update, cleanup of throttle cruise code 2012-08-09 16:59:44 -07:00
rmackay9
94cb325184 ArduCopter: added ahrs.ini() to system.pde to allow offsets to be pushed into MPU6000's DMP 2012-07-28 14:21:45 +09:00
Jason Short
a7b1252b51 arducopter
alt hold state reset
2012-07-18 22:57:11 -07:00
Jason Short
bb99bd4626 Arducopter: INS
removed zero accells call
2012-07-18 22:57:10 -07:00
Andreas M. Antonopoulos
c73f7ef3ab AP_Limits library, provides modular "limits" such as altitude and geo-fencing. 2012-07-14 19:26:17 -07:00
Jason Short
1dbde3f803 Arducopter: Added note 2012-07-10 21:53:37 -07:00
Amilcar Lucas
dfe0983e1e Merge the changes from APM_Camera branch into ArduCopter
Conflicts:

	ArduCopter/Camera.pde
	ArduCopter/Parameters.pde
2012-07-11 00:39:13 +02:00
Jason Short
9a30270879 System.pde - RTL
removed Approach mode, fixed RTL to loiter until desired altitude is reached
2012-07-01 13:40:12 -07:00
Andrew Tridgell
82ede937e7 AnalogSource: convert analogRead() calls to the new API
this should give us much better analog values, plus save a bunch of
CPU time
2012-07-01 15:01:05 +10:00
Jason Short
031830b5fe System.pde: Toy mode details for set_mode() 2012-06-29 21:20:28 -07:00
Jason Short
cd93c40f09 Added Toy Mode control 2012-06-25 23:08:25 -07:00
Jason Short
8b212d8baa Adjustments to the Inertial_nav
lowered Rate_I and Rate_P to be less jumpy. raised throttle_p
added a clear to rate when entering loiter
moved the raw reporting
2012-06-20 08:47:47 -07:00
Andrew Tridgell
940d994efb GPS: Use appropiate GPS_ENGINE settings in APM, ACM and rover 2012-06-10 16:36:18 +10:00
Andrew Tridgell
a684bddbda GPS: open the GPS serial port with a 256 byte buffer
the UBLOX needs more than 128 bytes for reliable parsing
2012-06-08 16:42:03 +10:00
Jason Short
71f80f3a77 Bug fix: When adjusting altitude, RTL then land will fail unless this var is reset to false. 2012-06-03 22:25:27 -07:00
Jason Short
0ce883b96a Removed unused variable 2012-05-29 12:43:23 -07:00
Jason Short
5754f97433 reversed circle_WP calculation so the next_WP refers to the destination around the circle and circle_WP refers to the center. The intent is to make it easier to see via ground station. 2012-05-27 09:21:20 -07:00
Robert Lefebvre
c8fb9a6635 More CopterLEDS changes.
Merged CopterLEDS and Piezo functions to eliminate pin conflict on APM2.  Created new Parameter bit to turn piezo function on and off from MP. Moved GPS and Aux pin assignments to allow commonality between APM1 and 2.  Set LED_Mode parameter default to 9 in order to make CopterLEDS completely backwards compatible with old Motor LEDS and Piezo code.  Legacy users should see no difference.
2012-05-15 12:00:21 -04:00
Adam M Rivera
0c3d6614cd system.pde: Updated param name to loiter_timer. 2012-04-16 10:12:30 -05:00
Adam M Rivera
a2b338c052 System: Added handler for the new APPROACH flight mode which will initiate an approach to a target alt as defined by the user. 2012-04-15 16:55:34 -05:00
rmackay9
c337df11c8 ArduCopter - LEDS - set new output pins to OUTPUT to support COPTER_LEDS.
Code by Robert Lefebvre
2012-04-12 22:55:40 +09:00
rmackay9
1d086c83f0 ArduCopter - system.pde - changed references to "motor_armed" to "motors.armed()" as part of the move to use AP_Motors library. 2012-04-04 23:03:21 +09:00
Andrew Tridgell
b4107d35e8 MAVLink: raise the serial transmit buffer size to 256 bytes
the 128 byte serial transmit buffer was causing significant problems
with queueing of mavlink messages. With 256 bytes we can fit a lot
more messages out in each pass of the code, which makes telemetry more
efficient

As we discussed on the dev call, we now have enough free ram for this
to be worthwhile
2012-03-30 17:46:20 +11:00
Andrew Tridgell
547b4ed55b AHRS: adapt ArduCopter for new AHRS framework 2012-03-19 17:29:02 +11:00
Jason Short
fe7ca98701 ACM: system.pde - removed reset_nav_I() to consolidate the wind control reset. 2012-03-18 22:31:21 -07:00
Jason Short
f9d0dc9daa ACM: disabled auto_calibration until more testing can be done 2012-03-10 12:44:49 -08:00
Jason Short
5ad7320505 ACM: changed alt hold initialization of altitude to be immediate 2012-03-10 12:44:18 -08:00
Andrew Tridgell
828ad7625b ACM: removed the ADC filtering code 2012-03-10 10:34:32 +11:00
Andrew Tridgell
8393c0299b ACM: removed the DCM tuning overrides
not needed now that DCM scales with deltat
2012-03-10 10:34:31 +11:00
Andrew Tridgell
7e4c8592ff ACM: make it possible to build ArduCopter with quaternions 2012-03-10 10:34:29 +11:00
Andrew Tridgell
367947fd33 HWSTATUS: if we don't know the voltage, report it as zero
this will tell us if board_voltage() is really working
2012-03-10 10:34:28 +11:00
Andrew Tridgell
64cc04ae09 ACM: adjust yaw drift correction constants
this should give the compass a bit more authority
2012-03-10 10:34:28 +11:00
Jason Short
730476fdfd ACM -
Implemented automatic ranging of Alt Hold gains. Works well in simulator and testing.
- alt hold estimation moved to 50 hz
- simple fixed observer calc for smooth and accurate climb rates useful for derivative calcs
- auto-reset of the I term by moving I value into throttle value. This recalcs the gain every 20seconds for battery drainage compensation in long flights.
- remove filtering for Nav_throttle
- added a way to lower the gain on nav_throttle for descents by / climb_rate error by 2 - seems to work OK and keeps copter from dropping like a rock when the Baro drifts quickly lower.
- removed old throttle hold set point code
- made throttle override for alt hold +- 200 vs 250
2012-03-06 22:22:14 -08:00
Andrew Tridgell
cb874d6097 ACM: added board_voltage() 2012-03-02 15:48:28 +11:00
Jason Short
eac77504a3 Added more Logging for PIDs. 2012-02-26 11:33:36 -08:00
Jason Short
f27e9f9ca1 added a simple rest of nav_throttle just in case 2012-02-25 13:31:21 -08:00
Jason Short
42b5d47f7b commented out control mode debug print 2012-02-21 21:48:07 -08:00
Jason Short
336441b109 reset slow_WP option at mode switch 2012-02-19 13:13:42 -08:00
Jason Short
17c6c7b294 added extra gain logging 2012-02-16 22:09:22 -08:00
Andrew Tridgell
3b4cae3cc3 adapted main ACM code for AP_Param 2012-02-13 16:22:52 +11:00
Jason Short
8ae53bffd2 Made Yaw Hold universal for Acro 2012-02-10 22:32:55 -08:00
Andrew Tridgell
1a861b3de5 allow for lower serial baud rates
not many people will use less than 9600 baud, except for those wanting
to test extreme range radios, which is what I'm trying to do :-)
2012-02-04 19:07:18 +11:00
Michael Oborne
151479f769 fix issue 502
to identify quad over mavlink
2012-02-03 06:53:08 +08:00
Jason Short
7833cea9d4 2.2B6 - Please verify Heli still functions properly.
Added AC_PID lib
Updated landing code
bug fixes
2012-01-28 22:00:05 -08:00
Randy Mackay
122623f64b OpticalFlow - added OF_LOITER flightmode 2012-01-28 09:27:16 +09:00
Jason Short
6784989e83 relocated reset_I term functions to central location 2012-01-20 22:52:30 -08:00
Jason Short
3ebed0b278 This allows users to test the Auto_throttle hold or cruise value 2012-01-14 11:43:52 -08:00
Jason Short
7877a872d3 added update throttle cruise function 2012-01-13 16:48:05 -08:00
Jason Short
a59c9ae22c added notes 2012-01-12 22:28:58 -08:00
Jason Short
4b54887c6c Switched to set_next_WP for mode switches 2012-01-10 23:43:44 -08:00
Jason Short
cf92631d33 added #if to wind compensation code 2012-01-10 23:42:26 -08:00
Randy Mackay
f68d23d91e ArduCopter - added ROLL_PITCH_STABLE_OF (i.e. Stabilised Roll/Pitch + adjustments based on optical flow)
Removed optical flow from regular loiter for now until it's tested.
2012-01-09 13:53:54 +09:00
Jason Short
9c8122e061 converted auto land to use the mission planner version
Removed gate that looked for already set control_mode. Wasn't compatible with failsafe
2012-01-07 22:27:26 -08:00
Jason Short
98f9a5f237 Forced Faildafe throttle mode to throttle Auto 2012-01-06 10:21:50 -08:00
Jason Short
40ad164c8d Clears Auto_land timer 2012-01-05 21:15:12 -08:00
Andrew Tridgell
df81a9459a ACM: reset all I terms on gyro calibration 2012-01-05 10:15:14 +11:00
Jason Short
2e83e42764 Added precalc for wind compensation when entering Stabilze mode 2012-01-04 09:28:37 -08:00
Jason Short
ecb3241489 calc_wind_compensation called when exiting AP modes
Rate I terms reset in Acro Mode switch
Limit of 1 m set to alt hold
Reset circle angle to 0 by default
Land got land_complete var set to false by default
2012-01-04 09:28:37 -08:00
Andrew Tridgell
cdd5589498 I2c: default to 5ms timeout, and faster bus speed
we will slow down the speed when we get a failure
2012-01-04 16:36:47 +11:00
Randy Mackay
bbe6dea980 OptFlow - initial support for APM2 (there are still problems) including adding ability to set Chip Select pin.
Other unrelated changes are:
a) fixed typo in 'esitmate_velocity' to 'estimate_velocity'.
b) moved init_compass from system.pde to sensors.pde which seemed consistent with other sensors.
2011-12-30 12:06:31 +09:00
Andrew Tridgell
03a16c6e45 ACM: use new I2C library 2011-12-28 20:41:53 +11:00
Andrew Tridgell
73e6d5ee11 ACM: update for DataFlash changes 2011-12-28 16:00:49 +11:00
Andrew Tridgell
0dadbf932a removed "Please run setup" loop from ArduCopter
Chris asked for this to be removed as it was really mucking up the
initial experience setting up ArduCopter via the planner
2011-12-24 18:12:51 +11:00
Jason Short
e5a3899b7f added ability to enter Loiter with only optflow available 2011-12-23 14:46:32 -08:00
Andrew Tridgell
ad9c0533d8 ACM: run mavlink loop while erasing logs 2011-12-18 10:19:41 +11:00
Jason Short
1251e8105d Added failsafe check 2011-12-14 22:08:41 -08:00
Andrew Tridgell
483bef35e5 IMU: update ACM and APM for flash_leds change in IMU init 2011-12-13 18:19:41 +11:00
Andrew Tridgell
07dba4eff7 desktop: fixed Wire.begin() build problem 2011-12-12 15:14:55 +11:00
Pat Hickey
a48c65b5b5 ArduCopter: update AP_Baro constructors & initializers 2011-12-11 15:21:10 -08:00
Pat Hickey
f3ad7f3af8 Wire and SPI Init: move to sketch system.pde from libraries
* Wire.begin removed from AP_Baro_BMP085::init()
* SPI.begin  removed from AP_Baro_MS5611::init()
* SPI.begin  removed from AP_InertialSensor_MPU6000::hardware_init()

* Both Wire.begin and SPI.begin added very early in init_ardupilot in
  ArduCopter/system.pde and ArduPlane/system.pde
2011-12-11 15:21:10 -08:00
Pat Hickey
39fe9075d9 ArduCopter Init: different call to barometer.init based on CONFIG_BARO
* BMP085 has two arguments, second varying on apm1/apm2
* ms5611 has no arguments
2011-12-11 15:21:10 -08:00