a
Dependents: Skipper_operation gy-91_tset Autoflight2022_913
Fork of BMP280 by
Revision 9:315c0737f4bc, committed 2019-08-25
- Comitter:
- Skykon
- Date:
- Sun Aug 25 08:36:14 2019 +0000
- Parent:
- 8:2dc7ede4ac55
- Commit message:
- a
Changed in this revision
BMP280.cpp | Show annotated file Show diff for this revision Revisions of this file |
BMP280.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/BMP280.cpp Fri Sep 07 08:28:00 2018 +0000 +++ b/BMP280.cpp Sun Aug 25 08:36:14 2019 +0000 @@ -54,6 +54,7 @@ cmd[0] = 0xf5; // config cmd[1] = config(); //cmd[1] = 0b10111100; + //cmd[1] = 0b00010000; i2c.write(address, cmd, 2); cmd[0] = 0x88; // read dig_T regs
--- a/BMP280.h Fri Sep 07 08:28:00 2018 +0000 +++ b/BMP280.h Sun Aug 25 08:36:14 2019 +0000 @@ -146,6 +146,8 @@ void selectFilter(FilterSelection filter); void enableSPI3WriteMode(bool enable); + //void enableSPI3WriteMode(bool disable); + void resetSettings(); bool whoAmI(); @@ -169,6 +171,7 @@ char standByTime; //0.5,62.5,125,250,500,1000,2000,4000 [ms] char pressFilter; //off,2,4,8,16 bool SPI3WriteMode; //off,on + float sampleTime; float sampleRate; @@ -196,7 +199,9 @@ inline void BMP280::setPowerMode(OptionPowerMode op){powerMode = static_cast<char>(op);} inline void BMP280::setStandByTime(OptionStandByTime op){standByTime = static_cast<char>(op);} inline void BMP280::setPressFilter(OptionPressFilter op){pressFilter = static_cast<char>(op);} + inline void BMP280::enableSPI3WriteMode(bool enable){SPI3WriteMode = enable;} +//inline void BMP280::enableSPI3WriteMode(bool disable){SPI3WriteMode = disable;} inline char BMP280::ctrl_meas() { @@ -206,6 +211,7 @@ inline char BMP280::config() { return ((standByTime << 5) | (pressFilter << 2) | (static_cast<char>(SPI3WriteMode))); + //return ((static_cast<char>(0) << 5) | (static_cast<char>(4) << 2) | (static_cast<char>(0))); }