Commit Graph

127 Commits

Author SHA1 Message Date
Andrew Tridgell 16d72ca160 AP_InertialSensor: update PX4 driver to use read() method 2013-01-20 22:13:20 +11:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell d844a1ba3c AP_InertialSensor: fixed PX4 example build 2013-01-13 21:10:53 +11:00
Andrew Tridgell d7996acdf7 AP_InertialSensor: added set_board_orientation() method 2013-01-13 17:32:48 +11:00
Andrew Tridgell 6142eac4b4 AP_InertialSensor: simplify get_delta_time() API
use a single float return rather than two APIs.

This also changes the MPU6k driver to match the new 2.9 behaviour of
using the MPU6k sample timing instead of micros()
2013-01-11 21:17:21 +11:00
Andrew Tridgell 2fe4656a50 Merge pull request #4 from GaloisInc/master
Thanks Pat!
2013-01-10 17:24:59 -08:00
Pat Hickey 910e09fc96 AP_InertialSensor_MPU6000: fix sync/async semaphore usage with new scheduler 2013-01-10 14:12:19 -08:00
Andrew Tridgell dbad61816b AP_InertialSensor: only build Oilpan driver on APM1 2013-01-10 21:01:55 +11:00
James Bielman 8e38ef6567 MPU6000: Flip Y and Z axes for SMACCM_HAL.
- The accelerometer is upside-down on the PX4FMU vs the APM2.
2013-01-09 11:19:51 -08:00
James Bielman 1309b7332a MPU6000: Use signed addition when accumulating readings.
- Fixes very erratic accel readings on the PX4 board.
2013-01-09 11:19:51 -08:00
Andrew Tridgell f48790a56e AP_InertialSensor: poll for new data in num_samples_available()
this lowers the latency for new data
2013-01-09 20:31:09 +11:00
Andrew Tridgell 4ab1cddd15 AP_InertialSensor: ensure we always have the SPI semaphore for MPU6k 2013-01-09 20:30:20 +11:00
Andrew Tridgell b39166b71a MPU6000: fixed minor timing bug
if we miss a sample due to SPI contention we shouldn't update last
sample time
2013-01-07 11:07:29 +11:00
Andrew Tridgell fd23f6bd33 InertialSensor: added PX4 example sketch 2013-01-04 14:26:14 +11:00
Andrew Tridgell ae09b31176 AP_InertialSensor: added PX4 gyro/accel driver 2013-01-04 14:25:57 +11:00
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 d808c19c10 AP_InertialSensor_MPU6000: uses new semaphores
* some refactoring to fix differences between timerprocess
  and non-timerprocess usage
2013-01-03 13:48:07 -08:00
James Bielman acf05a29ee AP_InertialSensor_MPU6000: Poll status register if there is no data ready pin. 2013-01-03 13:48:06 -08:00
rmackay9 e594f18b75 AP_InertialSensor: added parameter descriptions 2013-01-02 16:32:43 +09:00
Andrew Tridgell 374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell 3f6f0b6d79 Oilpan: removed reference to DESKTOP_BUILD 2013-01-02 15:39:41 +11:00
rmackay9 a76aec675a AP_InertialSensor: resolved compile warning re uninitialised variable 2013-01-02 09:18:03 +11:00
Andrew Tridgell 0adc4afcb5 InertialSensor: add reboot option in MPU6000 test 2012-12-27 21:29:00 +11:00
Andrew Tridgell 212728be34 InertialSensor: ensure MPU6000 is out of sleep mode before configuring
the MPU6000 starts in sleep mode, and can take a while to wakeup
2012-12-27 21:28:41 +11:00
Andrew Tridgell 122b8716a7 InertialSensor: added auto reset of MPU6000 on startup failure
this works around the problem of the MPU6000 failing to come up on DTR
reset or warm reboot
2012-12-24 07:17:03 +11:00
Andrew Tridgell 44ad850542 InertialSensor: latch the data ready pin high on new data
this ensures we don't miss a sample due to another source of delay
2012-12-23 17:46:36 +11:00
Andrew Tridgell fcb09c3993 InertialSensor: fixed example app for new syntax 2012-12-23 12:49:34 +11:00
Andrew Tridgell e2edad8a3f InertialSensor: fixed last sample time in MPU6000
we lost this in the final work on the DTR bug
2012-12-23 08:59:35 +11:00
Andrew Tridgell 1a53bc783c InertialSensor: poll data ready pin instead of an interrupt for MPU6k 2012-12-22 09:16:31 +11:00
Andrew Tridgell 9548e7e79e InertialSensor: simplify the data_ready interrupt handling
this avoids using the defer process code, and fixes a nasty bug that
caused the APM to lockup on reset
2012-12-21 20:01:19 +11:00
Andrew Tridgell f504e2ec67 InertialSensor: removed sample rate in example
not needed any more
2012-12-20 15:16:43 +11:00
Pat Hickey 6437bd3a08 AP_InertialSenor MPU6000 test: fixed for user interact changes 2012-12-20 14:53:23 +11:00
Pat Hickey 9055681b3a AP_InertialSensor: use AP_InertialSensor_UserInteract
* permits polymorphic user interaction, so we can plug in a
  pure mavlink interface
2012-12-20 14:53:23 +11:00
Pat Hickey a2cf47e769 AP_InertialSensor: start implementing UserInteract
* untested implementation in terms of BetterStream
2012-12-20 14:53:23 +11:00
Andrew Tridgell bada70d871 InertialSensor: fixed example build on 1280 2012-12-20 14:53:22 +11:00
Andrew Tridgell 3c0440b0b4 Math: use common degrees() and radians() functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell 7277d4934d AP_InertialSensor: move constructor into cpp 2012-12-20 14:53:22 +11:00
Andrew Tridgell b06e072c87 AP_InertialSensor: fixed example build 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
Andrew Tridgell 44f860e102 InertialSensor: fixed some compiler warnings 2012-12-20 14:52:35 +11:00
Pat Hickey b502732249 AP_InertialSensor: rewrite basic code for spi device transactions
* I'm not touching that DMP stuff because I'm pretty convinced it should
  instead be deprecated
2012-12-20 14:52:32 +11:00
Pat Hickey a4f41c1d29 AP_InertialSensor: MPU6000 uses scheduler panic 2012-12-20 14:52:31 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Andrew Tridgell 2c1682f310 InertialSensor: use AP_HAL progmem 2012-12-20 14:51:39 +11:00
Andrew Tridgell c064becf28 AP_InertialSensor: updates for new AP_Param API 2012-12-20 14:51:39 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Andrew Tridgell 38031edc9d AP_InertialSensor: removed spurious init() method 2012-12-20 14:51:36 +11:00
Andrew Tridgell c9a81d7de6 AP_InertialSensor: fixed sign of 16 bit SPI transfer
this gets accels and gyros working again
2012-12-20 14:51:36 +11:00
Pat Hickey dbcc4fc6a5 AP_InertialSensor: variable wibble 2012-12-20 14:51:36 +11:00
Pat Hickey 9aca19415a AP_InertialSensor: robust semaphores 2012-12-20 14:51:36 +11:00