BMP280 work
This commit is contained in:
9
BMP280.h
9
BMP280.h
@ -3,7 +3,7 @@
|
||||
|
||||
#include "softspim.h"
|
||||
|
||||
#define PRECOMP_COMPENSATION
|
||||
//#define PRECOMP_COMPENSATION
|
||||
|
||||
class BMP280
|
||||
{
|
||||
@ -42,8 +42,8 @@ private:
|
||||
static constexpr int16_t digP7value = 7;
|
||||
static constexpr int16_t digP8value = 3;
|
||||
static constexpr int16_t digP9value = 58;
|
||||
static constexpr int32_t var1StepA = ((((int32_t)t_fine)>>1) - (int32_t)64000);
|
||||
static constexpr int32_t var1StepB = ((((32768+((((digP3value *
|
||||
static constexpr int32_t var1StepA = ((((int32_t)t_fine)>>1) - (int32_t)64000);
|
||||
static constexpr int32_t var1StepB = ((((32768+((((digP3value *
|
||||
(((var1StepA>>2) * (var1StepA>>2)) >> 13 )) >> 3) + ((((int32_t)digP2value) * var1StepA)>>1))>>18)))*
|
||||
((int32_t)digP1value))>>15);
|
||||
static constexpr int32_t var2StepA = ((((var1StepA>>2) * (var1StepA>>2)) >> 11 ) * ((int32_t)digP6value)) + ((var1StepA*((int32_t)digP5value))<<1);
|
||||
@ -64,5 +64,6 @@ private:
|
||||
public:
|
||||
|
||||
BMP280(SpiMaster * const spi, volatile uint8_t * const port, const uint8_t pin);
|
||||
uint16_t getPressure();
|
||||
uint16_t getPressure();
|
||||
void getCoefficient(uint16_t* coefficients);
|
||||
};
|
||||
|
Reference in New Issue
Block a user