Commit Graph

53 Commits

Author SHA1 Message Date
rmackay9 e2b1cb7e8d AP_InertialSensor: changes after review with Tridge.
sanity checking added to accelerometer calibration routine.
user feedback is sent using gcs_send_text_fmt instead of Serial.printf.
moved ins parameters to new eeprom number to avoid conflicts with older parameters.
other small changes including renaming of functions and parameters.
2012-11-07 19:21:15 +09:00
rmackay9 e835cef181 AP_InertialSensor: merge in calibration features from IMU library
add gauss-newton method of accelerometer calibration
2012-11-07 19:20:27 +09:00
rmackay9 1cd4b08fac AP_AHRS: added scheduler parameter to init
Required by the AP_AHRS_MPU6000 class which needs to disable timed processes that could interfere with it's communication with the mpu6000
2012-09-29 13:51:21 +09:00
rmackay9 4bca609b9f AP_InertialSensor_MPU6000: replaced _cs_pin parameter with #define and saved 1 byte of memory
Updated ArduCopter, ArduPlane and example sketches in AP_InertialSensor, AP_IMU and AP_AHRS libraries because they no longer need to pass in cs_pin to the constructor
2012-09-28 19:21:59 +09:00
rmackay9 2fd9022f03 ArduCopter: bug fix to DMP initialisation (it was freezing due to SPI bus conflicts) 2012-09-28 18:34:23 +09:00
Andrew Tridgell 3306ba95a7 MPU6k: save 72 bytes of memory
the buffer can be on the stack
2012-09-18 13:58:50 +10:00
rmackay9 8624b0138e AP_InertialSensor_Stub: added num_samples_available method to fix HIL build 2012-09-10 11:38:13 +09:00
rmackay9 d8142c2351 AP_InertialSensor_MPU6000: move _last_sample_time_micros to capture time data_interrupt was called 2012-09-10 11:38:08 +09:00
rmackay9 bd3eab7c0f AP_InertialSensor: use AP_TimerProcess's queue_process to run read from MPU6000 after any currently running processes complete 2012-09-10 11:38:03 +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
rmackay9 67252c8a9b AP_InertialSensor_MPU6000: bug fix. DMP was being enabled by default so although the results were not being used, this caused a delay in the main loop 2012-08-28 17:02:07 +09:00
uncrustify 3f0efe4570 uncrustify libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.h 2012-08-21 19:03:14 -07:00
uncrustify 91d52b6290 uncrustify libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.h 2012-08-21 19:03:14 -07:00
uncrustify c47127fb80 uncrustify libraries/AP_InertialSensor/AP_InertialSensor_Stub.h 2012-08-21 19:03:14 -07:00
uncrustify c3de56ba94 uncrustify libraries/AP_InertialSensor/AP_InertialSensor.h 2012-08-21 19:03:14 -07:00
uncrustify 9d7ca3a876 uncrustify libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp 2012-08-21 19:03:14 -07:00
uncrustify bc6d3811bc uncrustify libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp 2012-08-21 19:03:14 -07:00
uncrustify a946ed762b uncrustify libraries/AP_InertialSensor/AP_InertialSensor_Stub.cpp 2012-08-21 19:03:14 -07:00
uncrustify 78f95e5cce uncrustify libraries/AP_InertialSensor/examples/MPU6000/MPU6000.pde 2012-08-21 19:03:14 -07:00
Andrew Tridgell 0491188c03 MPU6000: fixed some build warnings 2012-08-09 16:19:21 +10:00
Andrew Tridgell e9d0ae3e7f AP_Param: update remaining libraries for new constructor syntax 2012-08-08 12:11:57 +10:00
rmackay9 23a1e33e20 AP_InertialSensor_MPU6000: another attempt at fixing the SITL build 2012-07-28 17:19:19 +09:00
rmackay9 06a4aaa763 AP_InertialSensor_MPU6000: changed DMP memory definition (dmpMem) to const uint8_t to remove SITL compile errors (hopefully)
Removed unused 'dump' variable from dmp_load_mem to reduce compiler warnings
2012-07-28 16:33:04 +09:00
rmackay9 ea4e56309d AP_InertialSensor_Oilpan: changed initialisation order of parameters to remove compiler warning 2012-07-28 15:22:37 +09:00
rmackay9 dfea845c37 AP_InertialSensor: methods added to access DMP functionality 2012-07-28 14:14:43 +09:00
Jason Short 25c3ed6c4b Oilpan ADC parameters added
including a function that configures each Accel Axis
Defaults matching old behavior
Added param group
2012-07-18 22:57:11 -07:00
Andrew Tridgell 02b9ea4dfe MPU6k: removed an unused variable 2012-06-29 21:54:09 +10:00
Craig Elder fe742f1c23 IMU: expose IMU_PRODUCT_ID as EEPROM Variable
this will allow us to log the Product ID in tlogs
2012-05-09 18:30:36 -07:00
Craig Elder c323a71933 AP_InertialSensor: Return product ID from sensor initialization
this exposes the product ID to the IMU Layer
2012-05-09 18:30:36 -07:00
Craig Elder b824a87b90 MPU6000: Fixed Scaling on Accelerometers Rev C vs Rev D
Rev C have non standard scaling factor that is 1/2 of the data sheet
Rev D chips conform to the specification
2012-05-09 18:30:35 -07:00
Andrew Tridgell 76a3fd9a4e MPU6k: added suspend/resume on init 2012-05-01 12:06:54 +10:00
Andrew Tridgell 07e8360970 InertialSensor: fixed HIL build 2012-03-10 10:34:34 +11:00
Andrew Tridgell f46fba54dc AP_InertialSensor: added a get_gyro_drift_rate() interface
this returns the expected max drift rate for the particular type of
gyro being used
2012-03-10 10:34:33 +11:00
Andrew Tridgell ff4f7ccc65 InertionSensor: update for new Ch6() interface 2012-03-10 10:34:32 +11:00
Andrew Tridgell a052aa8435 AP_InertialSensor: added new_data_available() interface 2012-03-10 10:34:28 +11: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
Andrew Tridgell 9ef1c421bd MPU6k: don't init the Wire library
we don't use Wire any more
2011-12-28 20:41:53 +11:00
Andrew Tridgell 1cb8728a6b MPU6000: protect the driver from double initialisation
initialising twice can lockup the driver
2011-12-28 16:00:48 +11:00
Andrew Tridgell f2bbfb1296 MPU6000: minor fixes
the hardware functions should be private, and cs_pin should be uint8_t
2011-12-28 16:00:48 +11:00
Andrew Tridgell df0d151891 MPU6000: change to 98Hz low pass filter
based on recommendation from Pat
2011-12-26 19:17:11 +11:00
Andrew Tridgell 3ef707a2c3 MPU6000: use data ready interrupt to prevent stale data
We listen for a data ready interrupt and only read new data in read()
if there is new data
2011-12-26 19:17:11 +11:00
Andrew Tridgell 71e08f8484 fixed the MPU6000 test sketch 2011-12-26 19:17:11 +11:00
Andrew Tridgell 7c0f39aec5 added MPU6000 test sketch
this doesn't work yet - Pat, any idea why?
2011-12-25 12:03:39 +11:00
Andrew Tridgell cef1c4c558 MPU6k: update driver for new ap_proceduce prototype 2011-12-21 23:31:38 +11:00
Andrew Tridgell eac625ba8f rollover is not a bug
subtracting unsigned numbers does the right thing
2011-12-21 23:31:38 +11:00
Andrew Tridgell eec5f000b5 added code format markers to AP_InertialSensor library 2011-12-21 23:31:38 +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 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
Pat Hickey 6710cf5c5a Wire and SPI Init: move to sketch system.pde from libraries
* Wire.begin removed from AP_Baro_BMP085::init()
* SPI.begin  removed from AP_Baro_MS5611::init()
* SPI.begin  removed from AP_InertialSensor_MPU6000::hardware_init()

* Both Wire.begin and SPI.begin added very early in init_ardupilot in
  ArduCopter/system.pde and ArduPlane/system.pde
2011-12-11 15:21:10 -08:00
Andrew Tridgell 252e858011 fixed InertialSensor stub build 2011-11-25 20:00:18 -08:00