Commit Graph

84 Commits

Author SHA1 Message Date
James Bielman d84ba8ef59 Use HAL suspend/resume timer procs rather than atomic.
- Preparation for removing begin/end atomic.
2013-01-03 17:33:13 -08:00
Pat Hickey a556a95565 AP_ADC: uses new semaphore interface 2013-01-03 13:48:07 -08:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell d6b00bd848 AP_ADC: fixed bool problem on ARM 2013-01-02 14:45:09 +11:00
Andrew Tridgell a1187519a8 AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches 2012-12-20 14:52:37 +11:00
Andrew Tridgell b673320f72 ADC: fixed example warnings 2012-12-20 14:52:36 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Pat Hickey 992de8c2b9 AP_ADC_ADS7844: changed to use spidevicedriver transaction 2012-12-20 14:52:32 +11:00
Pat Hickey b43b003777 AP_ADC: fix typo in test 2012-12-20 14:52:32 +11:00
Pat Hickey d5a46ca1e3 AP_ADC: uses scheduler panic 2012-12-20 14:52:32 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey 09c14f3807 AP_ADC: more robust semaphores 2012-12-20 14:51:35 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Pat Hickey 668caa4a2e Fix calls to AP_HAL::Scheduler::register_timer_process 2012-12-20 14:51:27 +11:00
Andrew Tridgell 53105efbcd HAL_AVR: more uart0 -> console changes 2012-12-20 14:51:27 +11:00
Pat Hickey 30deb76ea3 AP_ADC: ported to AP_HAL
AP_ADC_test run on bench with APM1, looks ok.
2012-12-20 14:51:25 +11:00
Michael Oborne 1a3a7d173a AP remove debug include 2012-11-26 19:02:17 +08:00
Michael Oborne ed61ef61ed AP: fix ap hil. 2012-11-26 18:53:51 +08:00
Andrew Tridgell c1a02e49a0 ADC: switch to SREG = oldSREG pattern for interrupt mask/restore 2012-11-20 22:30:03 +11:00
Pat Hickey 8a6017ea48 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 6ea5c21f7c 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 0a6219695b 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 fc11f7e3f0 uncrustify libraries/AP_ADC/AP_ADC_HIL.h 2012-08-21 18:59:13 -07:00
uncrustify f302ee3d7f uncrustify libraries/AP_ADC/AP_ADC.h 2012-08-21 18:59:13 -07:00
uncrustify 44941072dc uncrustify libraries/AP_ADC/AP_ADC_ADS7844.h 2012-08-21 18:59:13 -07:00
uncrustify 149e222e6a uncrustify libraries/AP_ADC/AP_ADC_HIL.cpp 2012-08-21 18:59:13 -07:00
uncrustify 7b41104d7e uncrustify libraries/AP_ADC/AP_ADC.cpp 2012-08-21 18:59:13 -07:00
uncrustify 79b370cf1d uncrustify libraries/AP_ADC/AP_ADC_ADS7844.cpp 2012-08-21 18:59:13 -07:00
uncrustify 796d23277c uncrustify libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.pde 2012-08-21 18:59:13 -07:00
Andrew Tridgell d692a932ca ADC: added suspend/resume on init 2012-05-01 12:06:54 +10:00
Andrew Tridgell 9b95d2060a 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 f9394f8068 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 a0a360f955 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 c80ec9a55c AP_ADC: added new_data_available() interface
returns true if more samples are available
2012-03-10 10:34:28 +11:00
rmackay9 c444cdb3f4 AP_ADC - removed small compiler warning 2012-02-29 22:43:46 +09:00
Andrew Tridgell 79d622939a 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 cf25bbfa74 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 ed19c25a97 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 94e7ba8df2 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 354d9588bf sensorSign swicth 2012-01-10 23:43:44 -08:00
Andrew Tridgell 8780a60234 ADC: update for new ap_proceduce prototype 2011-12-21 23:31:38 +11:00
Andrew Tridgell 6341db7031 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 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