Commit Graph

67 Commits

Author SHA1 Message Date
Michael Oborne e1659b62d2 AP remove debug include 2012-11-26 19:02:17 +08:00
Michael Oborne b2976c1114 AP: fix ap hil. 2012-11-26 18:53:51 +08:00
Andrew Tridgell 0c8cef5714 ADC: switch to SREG = oldSREG pattern for interrupt mask/restore 2012-11-20 22:30:03 +11:00
Pat Hickey 5743418f53 AP_ADC_test: fix build of test regressions.
I'm not convinced I was able to make the timing test meaningful.
Someone should please lookinto this.
2012-10-09 15:23:40 -07:00
rmackay9 5a3645d36a AP_ADC: added num_samples_available to allow main loop to be synced with arrival of new sensor data for Oilpan. 2012-09-10 11:37:43 +09:00
rmackay9 3901387c8d AP_InertialSensor: changed read of sensor from MPU6000 to happen immediately
This reduces the delay between when data arrives and when it is used
by up to 1ms.

Added num_samples_available method to all InertialSensors to allow
main loop timing to be synced with sensors.
2012-09-10 11:37:33 +09:00
uncrustify 520ab058a7 uncrustify libraries/AP_ADC/AP_ADC_HIL.h 2012-08-21 18:59:13 -07:00
uncrustify 2ff3af5e01 uncrustify libraries/AP_ADC/AP_ADC.h 2012-08-21 18:59:13 -07:00
uncrustify 549950ee2d uncrustify libraries/AP_ADC/AP_ADC_ADS7844.h 2012-08-21 18:59:13 -07:00
uncrustify bd0b3ee6b2 uncrustify libraries/AP_ADC/AP_ADC_HIL.cpp 2012-08-21 18:59:13 -07:00
uncrustify 0fcf421752 uncrustify libraries/AP_ADC/AP_ADC.cpp 2012-08-21 18:59:13 -07:00
uncrustify dcf4a9824d uncrustify libraries/AP_ADC/AP_ADC_ADS7844.cpp 2012-08-21 18:59:13 -07:00
uncrustify 7bfe32fd3d uncrustify libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.pde 2012-08-21 18:59:13 -07:00
Andrew Tridgell 3115d48ba1 ADC: added suspend/resume on init 2012-05-01 12:06:54 +10:00
Andrew Tridgell 16f094a1c5 ADC: minor fix to the ADC Ch6() code
we don't need to add count any more, as floating point maths doesn't
need to round up
2012-03-27 15:37:24 +11:00
Andrew Tridgell 2b6fae6e16 ADC: removed the ADC level accel smoothing
the quaternion code does a better job of handling this noise than this
filter does
2012-03-10 10:34:32 +11:00
Andrew Tridgell 404a4e4896 ADC: use floats for ADC averaging
this costs almost nothing and improved accel/gyro calibration
2012-03-10 10:34:32 +11:00
Andrew Tridgell 61d649e7ac AP_ADC: added new_data_available() interface
returns true if more samples are available
2012-03-10 10:34:28 +11:00
rmackay9 ced49f7d01 AP_ADC - removed small compiler warning 2012-02-29 22:43:46 +09:00
Andrew Tridgell 3fbb5a2d6c ADC: on channel overflow we should not zero last_ch6_micros
this happens every 64 seconds because of unused channels on the
ADC. Zeroing this creates a bad delta_t value for the DCM code.
2012-02-16 17:48:36 +11:00
Randy Mackay 52f6e56f72 AP_ADC library - tiny fix to make example sketch work after some changes to AP_PeriodicProcess library 2012-01-28 13:12:19 +09:00
Randy Mackay 98f3386ea0 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Jason Short 0e58efca89 Removed Gyro filter, In the end it doesn't help and I think it could actually hurt gyro integration. 2012-01-20 22:52:29 -08:00
Jason Short ecaf5ac461 sensorSign swicth 2012-01-10 23:43:44 -08:00
Andrew Tridgell f587a01165 ADC: update for new ap_proceduce prototype 2011-12-21 23:31:38 +11:00
Andrew Tridgell 3654c714e9 Revert "ADC: only read channels that are actually being used"
This reverts commit 95e6bb26f4772ca8c7faa62215de6f078d3df3c7.

ADC will be disabled on APM2
2011-12-17 07:29:09 +11:00
Andrew Tridgell c18ad75504 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 f6a7ad9fa6 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 4bbd5392ef 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 04ec569313 ADC: fixed HIL build 2011-12-16 20:58:04 +11:00
Andrew Tridgell c56e5735c2 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 af7e34fcc1 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 9e9b229a1d fixed formatting of ADC driver
it was a nasty mix of DOS and UNIX
2011-12-16 20:09:29 +11:00
Andrew Tridgell 47da2ec992 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 ff727e87ca 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 6d876bc54d 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 945a7c13a7 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 cf59e8ad82 Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2011-09-30 18:40:40 -07:00
Jason Short 9a4bd31a8b 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 ac3e73f5c0 Optional recursion added. 2011-09-30 17:17:51 -04:00
Jason Short 4c30b544dc Merge branch 'master' of https://code.google.com/p/ardupilot-mega 2011-09-29 23:27:36 -07:00
Jason Short df1a39f650 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 112d5e9531 Improvements to cmake. 2011-09-29 21:23:26 -04:00
James Goppert 3a00ceb593 Added ArduBoat/ ArduRover/ and APO library. 2011-09-29 14:12:15 -04:00
Andrew Tridgell cc4bae4b42 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 a828d00125 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 1b5c7e8a90 ADC: show timing information in ADC test 2011-09-17 14:58:02 +10:00
Andrew Tridgell 4a7c9c406f show noise levels in ADC test 2011-09-17 14:58:02 +10:00
Andrew Tridgell 2ae78e197e 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 812cd3562f updated ADC test for new API 2011-09-17 14:58:02 +10:00