Commit Graph

17 Commits

Author SHA1 Message Date
justinbeech 5255512bf9 Found free extra 256 bytes of RAM eliminate _clz use from libgcc
Believe it or not, changing / 2^31 to >>31 saved 256 bytes in the "d" segment.

The reason is that GCC version prior to 4.3.5 does not have a count_leading_zeros (clz) assembler macro, so it uses a 256 byte lookup table called _clz
The _clz table gets pulled in if you do 64 bit division.
This tiny change is the only place that we do long long division.
Changing to a shift saves 256 bytes of ram.
2012-02-17 09:46:05 +00:00
Jason Short 8e88d9e19e change constant to float 44330.0 2012-02-15 09:10:14 -08:00
Andrew Tridgell e70e1814ac AP_Baro: fixed some signed/unsigned warnings
and a potential bug on timer wrap
2012-02-13 21:39:18 +11:00
justinbeech 4b0c71d6ac Uncommented cold temp compensation after testing. Fixed read throttle so read rate ends up nailing 100hz, not 90hz. minor commenting improvements. 2012-02-13 00:00:06 +00:00
Andrew Tridgell 2960abf41f I2C: convert barometer library to new I2C library
this also adds a healthy attribute and error checking
2011-12-28 20:41:53 +11:00
Andrew Tridgell 5b75458502 AP_Baro: update MS5611 driver for new ap_proceduce prototype
this saves calling millis() quite so often
2011-12-21 23:31:38 +11:00
Andrew Tridgell 0c8c707980 AP_Baro: fixed temperature on MS5611
this caused a 2x scaling of altitude
2011-12-17 14:58:58 +11:00
Pat Hickey 5819f99986 AP_Baro_MS5611: Asynchronous operation, plus c++ style changes.
Yeah, I know this was a big change to make all at once.
2011-12-11 15:21:10 -08:00
Pat Hickey 3d882c4d49 AP_Baro : Add init( AP_PeriodicProcess * ) method to interface & implementations
AP_Baro_MS5611 and AP_Baro_BMP085 implement the interface, with stubs only
2011-12-11 15:21:10 -08: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
Pat Hickey 45cbb24ba5 AP_Baro_MS5611: init must also perform SPI.begin 2011-12-11 15:21:09 -08:00
Pat Hickey a75257f102 AP_Baro_MS5611: CS pin is arduino pin 40 2011-12-11 15:21:09 -08:00
Pat Hickey 7b708f8054 AP_Baro_MS5611: Implement AP_Baro interface 2011-12-11 15:21:09 -08:00
Pat Hickey 84cb023b12 AP_Baro_MS5611: renamed class implementation from APM_MS5611 2011-12-11 15:21:09 -08:00
Pat Hickey 3d93eb9534 AP_Baro_MS5611.h: reorganized
* moved ms5611 macros to c file
* reorganized class declaration & retabbed
* made Temp, Pres, and Alt private variables.
2011-12-11 15:21:09 -08:00
Pat Hickey 8f16b736a4 AP_Baro_MS5611: Overwrote with Jose Julio's latest files. 2011-12-11 15:21:09 -08:00
Pat Hickey cca6b2f98c Added AP_Baro and AP_Baro_MS5611 classes.
Incomplete and does not work.
2011-12-11 15:21:08 -08:00