Commit Graph

41 Commits

Author SHA1 Message Date
Andrew Tridgell d442bad413 Revert "ADC: added an enable_channel() API"
This reverts commit dafeac01d8f14162600cf821404ba4072dcae14d.

ADC will be disabled on APM2
2011-12-17 07:29:09 +11:00
Andrew Tridgell 99eafbbe38 Revert "ADC: fixed HIL build"
This reverts commit 86c1a6a5fdd929516cf0f64f4d610cfcd4b4f774.

ADC will now be disabled on APM2
2011-12-17 07:29:09 +11:00
Andrew Tridgell f6f808357c removed AperiodicProcess code
this code was never being used, and was more complex than it was
worth.
2011-12-17 07:29:09 +11:00
Andrew Tridgell d4b66139dc ADC: fixed HIL build 2011-12-16 20:58:04 +11:00
Andrew Tridgell 9591317dbc ADC: added an enable_channel() API
enable_channel() must be used before the Ch6() method is called to
enable gathering of data on the required channels
2011-12-16 20:09:40 +11:00
Andrew Tridgell 09947dace1 ADC: only read channels that are actually being used
on the APM2 we usually use none of the ADC channels, although we may
use the airspeed sensor. This change means we detect which channels
are being read, and only do the SPI transfers for those ones. That
saves us about 100usec per timer interrupt (ie. about 10% of our CPU)
2011-12-16 20:09:35 +11:00
Andrew Tridgell f125f6619a fixed formatting of ADC driver
it was a nasty mix of DOS and UNIX
2011-12-16 20:09:29 +11:00
Andrew Tridgell 5d503fd65e ADC: change adc.Ch() to return a float
this gives us a bit more precision in airspeed measurement, and costs
us virtually nothing as we are converting to float immediately after
getting the value
2011-12-12 15:14:55 +11:00
Andrew Tridgell e491168273 ADC: remove a very small (0.2 degrees/s) bias in the ADC code
small bias from integer rounding
2011-11-28 16:22:33 +11:00
Pat Hickey 017f121566 AP_ADC: rework ADC library to use PeriodicProcess and ISR_Register
this makes it possible to build the ADC library when another driver
may also want that interrupt
2011-11-25 20:00:16 -08:00
Jason Short 0bfa67f413 Heavy Accel Filter + mild Gyro Filter. To use, filter_result must be set to true on ADC. Off by default. 2011-10-01 15:44:53 -07:00
Jason Short 189fc194b6 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2011-09-30 18:40:40 -07:00
Jason Short f89da12387 Minimized the accel_filtered vector to be faster and more accurate.
Made the Filter include the Accels and moved from 8 to 4 terms in the filter
2011-09-30 18:40:29 -07:00
James Goppert 0c7c508541 Optional recursion added. 2011-09-30 17:17:51 -04:00
Jason Short a7ea200407 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2011-09-29 23:27:36 -07:00
Jason Short de61e87128 Added ADC gyro Filtering for quads - this fixes a noise issue introduced into the controller
added Position mode
removed
Added back in the accelerometer experiment
Added filter_result boolean to enable filter on the fly
2011-09-29 23:27:23 -07:00
James Goppert 5489b84f8e Improvements to cmake. 2011-09-29 21:23:26 -04:00
James Goppert d887a28b91 Added ArduBoat/ ArduRover/ and APO library. 2011-09-29 14:12:15 -04:00
Andrew Tridgell f375258699 fixed inconsistent linefeeds in ADC code
the linefeeds had bacome inconsistent in this library, making some
editors fail to load the code
2011-09-19 11:04:02 +10:00
Andrew Tridgell a835912d93 ADC: randomise the sampling rate
this is based on suggestions from Kari and Mike, and should reduce the
aliasing effects we get from the simple averaging
2011-09-17 14:58:02 +10:00
Andrew Tridgell 840c256fe3 ADC: show timing information in ADC test 2011-09-17 14:58:02 +10:00
Andrew Tridgell 197b1d140a show noise levels in ADC test 2011-09-17 14:58:02 +10:00
Andrew Tridgell 1d68953416 ADC: the bottom 3 bits of ADC output are always zero
its a 12 bit ADC .... silly of me to think the bottom 3 bits are
valid!
2011-09-17 14:58:02 +10:00
Andrew Tridgell bd30840518 updated ADC test for new API 2011-09-17 14:58:02 +10:00
Andrew Tridgell 9af7021a98 change ADC sample rate to 1kHz
this costs us about 9% of our CPU, but should make aliasing much less
of a problem.
2011-09-17 14:58:02 +10:00
Andrew Tridgell 70bf945d40 ADC: re-work for ADC code for full resolution and accurate timing
this changes the ADC code to return the full resolution of the
sensors. It also adds a new Ch6() interface that returns 6 channels at
once, so the IMU can read 3 accelerometers and 3 gyros at once, and
get the exact time that the values were accumulated over
2011-09-17 14:58:02 +10:00
unknown a4e001bbcf Adding CMake support 2011-09-14 15:44:55 +02:00
Jason Short ecd14f4425 Cleaned up guided mode
Reduced ADC filter to 3 from 6 to increase speed of filter.
2011-09-12 12:57:36 -07:00
jasonshort eb39d2d53a Added ability to grab an unfiltered value from the ADC
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2963 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-30 20:33:45 +00:00
deweibel@gmail.com 4015e7f91a Commit test - just adding an unneeded comment
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2740 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-03 19:39:55 +00:00
jasonshort c5f06b99fe silly formatting
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2566 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-16 16:43:43 +00:00
jasonshort c1ddd58d4c Implemented moving average filter to deal with noise issues on quads, default is a 6 member filter.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2551 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-12 23:50:15 +00:00
james.goppert 7809b0ca2a Massive warning fixes.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2089 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-04 19:12:27 +00:00
james.goppert@gmail.com 2d1b59e9a6 Eclipse makefile support for examples.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1861 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-09 19:39:27 +00:00
mich146@hotmail.com bae1c531d0 ADC Library - reimplement overflow
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1832 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-31 14:19:59 +00:00
mich146@hotmail.com cdcee09e0d Fix adc issue causing serial problems/other issues. (DOUG please check)
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1829 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-29 11:16:21 +00:00
deweibel@gmail.com 8e542512da Change ADC overflow correction
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1640 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-13 23:24:37 +00:00
james.goppert 9ddeb716c3 Corrected adc conversion.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1109 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-12 07:34:12 +00:00
james.goppert 7a0fcd6f59 Full HIL working!
git-svn-id: https://arducopter.googlecode.com/svn/trunk@963 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-28 01:58:53 +00:00
james.goppert 40f1d184a1 Cleaned up AP_ADC_HIL
git-svn-id: https://arducopter.googlecode.com/svn/trunk@961 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-28 00:28:01 +00:00
james.goppert cce122d387 Moved APM_ADC to AP_ADC
git-svn-id: https://arducopter.googlecode.com/svn/trunk@954 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 05:36:19 +00:00