Andrew Tridgell
f60d657f72
AP_InertialSensor: added timer for accumulating samples for PX4
...
this makes the driver much more tolerant of sketch timing errors
12 years ago
Andrew Tridgell
3d0cb755d2
AP_InertialSensor: user a timer to drive data collection on PX4
...
this reduces the chance of missing a sample if the main sketch is a
bit slow
12 years ago
Andrew Tridgell
16d72ca160
AP_InertialSensor: update PX4 driver to use read() method
12 years ago
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.
12 years ago
Andrew Tridgell
d844a1ba3c
AP_InertialSensor: fixed PX4 example build
12 years ago
Andrew Tridgell
d7996acdf7
AP_InertialSensor: added set_board_orientation() method
12 years ago
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()
12 years ago
Pat Hickey
910e09fc96
AP_InertialSensor_MPU6000: fix sync/async semaphore usage with new scheduler
12 years ago
Andrew Tridgell
dbad61816b
AP_InertialSensor: only build Oilpan driver on APM1
12 years ago
James Bielman
8e38ef6567
MPU6000: Flip Y and Z axes for SMACCM_HAL.
...
- The accelerometer is upside-down on the PX4FMU vs the APM2.
12 years ago
James Bielman
1309b7332a
MPU6000: Use signed addition when accumulating readings.
...
- Fixes very erratic accel readings on the PX4 board.
12 years ago
Andrew Tridgell
f48790a56e
AP_InertialSensor: poll for new data in num_samples_available()
...
this lowers the latency for new data
12 years ago
Andrew Tridgell
4ab1cddd15
AP_InertialSensor: ensure we always have the SPI semaphore for MPU6k
12 years ago
Andrew Tridgell
b39166b71a
MPU6000: fixed minor timing bug
...
if we miss a sample due to SPI contention we shouldn't update last
sample time
12 years ago
Andrew Tridgell
fd23f6bd33
InertialSensor: added PX4 example sketch
12 years ago
Andrew Tridgell
ae09b31176
AP_InertialSensor: added PX4 gyro/accel driver
12 years ago
James Bielman
d84ba8ef59
Use HAL suspend/resume timer procs rather than atomic.
...
- Preparation for removing begin/end atomic.
12 years ago
Pat Hickey
d808c19c10
AP_InertialSensor_MPU6000: uses new semaphores
...
* some refactoring to fix differences between timerprocess
and non-timerprocess usage
12 years ago
James Bielman
acf05a29ee
AP_InertialSensor_MPU6000: Poll status register if there is no data ready pin.
12 years ago
rmackay9
e594f18b75
AP_InertialSensor: added parameter descriptions
12 years ago
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
12 years ago
Andrew Tridgell
3f6f0b6d79
Oilpan: removed reference to DESKTOP_BUILD
12 years ago
rmackay9
a76aec675a
AP_InertialSensor: resolved compile warning re uninitialised variable
12 years ago
Andrew Tridgell
0adc4afcb5
InertialSensor: add reboot option in MPU6000 test
12 years ago
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
12 years ago
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
12 years ago
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
12 years ago
Andrew Tridgell
fcb09c3993
InertialSensor: fixed example app for new syntax
12 years ago
Andrew Tridgell
e2edad8a3f
InertialSensor: fixed last sample time in MPU6000
...
we lost this in the final work on the DTR bug
12 years ago
Andrew Tridgell
1a53bc783c
InertialSensor: poll data ready pin instead of an interrupt for MPU6k
12 years ago
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
12 years ago
Andrew Tridgell
f504e2ec67
InertialSensor: removed sample rate in example
...
not needed any more
12 years ago
Pat Hickey
6437bd3a08
AP_InertialSenor MPU6000 test: fixed for user interact changes
12 years ago
Pat Hickey
9055681b3a
AP_InertialSensor: use AP_InertialSensor_UserInteract
...
* permits polymorphic user interaction, so we can plug in a
pure mavlink interface
12 years ago
Pat Hickey
a2cf47e769
AP_InertialSensor: start implementing UserInteract
...
* untested implementation in terms of BetterStream
12 years ago
Andrew Tridgell
bada70d871
InertialSensor: fixed example build on 1280
12 years ago
Andrew Tridgell
3c0440b0b4
Math: use common degrees() and radians() functions
12 years ago
Andrew Tridgell
7277d4934d
AP_InertialSensor: move constructor into cpp
12 years ago
Andrew Tridgell
b06e072c87
AP_InertialSensor: fixed example build
12 years ago
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
12 years ago
Andrew Tridgell
44f860e102
InertialSensor: fixed some compiler warnings
12 years ago
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
12 years ago
Pat Hickey
a4f41c1d29
AP_InertialSensor: MPU6000 uses scheduler panic
12 years ago
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
12 years ago
Andrew Tridgell
2c1682f310
InertialSensor: use AP_HAL progmem
12 years ago
Andrew Tridgell
c064becf28
AP_InertialSensor: updates for new AP_Param API
12 years ago
Pat Hickey
475da4eca4
CONFIG_HAL_BOARD - test sketches fixed up, build all passes
12 years ago
Andrew Tridgell
38031edc9d
AP_InertialSensor: removed spurious init() method
12 years ago
Andrew Tridgell
c9a81d7de6
AP_InertialSensor: fixed sign of 16 bit SPI transfer
...
this gets accels and gyros working again
12 years ago
Pat Hickey
dbcc4fc6a5
AP_InertialSensor: variable wibble
12 years ago