#71: add BMP280 and env IV to cibuild
This commit is contained in:
parent
834bbcb72a
commit
abe15281a1
|
@ -63,6 +63,17 @@
|
||||||
#define _GWQMP6988
|
#define _GWQMP6988
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#GROVE
|
||||||
|
#ifdef M5_ENV4$GS$
|
||||||
|
#ifndef M5_GROOVEIIC$GS$
|
||||||
|
#define M5_GROOVEIIC$GS$
|
||||||
|
#endif
|
||||||
|
GROOVE_IIC(SHT3X,$Z$,1)
|
||||||
|
GROOVE_IIC(BMP280,$Z$,1)
|
||||||
|
#define _GWSHT3X
|
||||||
|
#define _BMP280
|
||||||
|
#endif
|
||||||
|
|
||||||
#GROVE
|
#GROVE
|
||||||
//example: -DSHT3XG1_A : defines STH3Xn1 on grove A - x depends on the other devices
|
//example: -DSHT3XG1_A : defines STH3Xn1 on grove A - x depends on the other devices
|
||||||
#ifdef GWSHT3XG1$GS$
|
#ifdef GWSHT3XG1$GS$
|
||||||
|
@ -118,6 +129,24 @@
|
||||||
#define _GWBME280
|
#define _GWBME280
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#GROVE
|
||||||
|
#ifdef GWBMP280G1$GS$
|
||||||
|
#ifndef M5_GROOVEIIC$GS$
|
||||||
|
#define M5_GROOVEIIC$GS$
|
||||||
|
#endif
|
||||||
|
GROOVE_IIC(BMP280,$Z$,1)
|
||||||
|
#define _GWBMP280
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#GROVE
|
||||||
|
#ifdef GWBMP280G2$GS$
|
||||||
|
#ifndef M5_GROOVEIIC$GS$
|
||||||
|
#define M5_GROOVEIIC$GS$
|
||||||
|
#endif
|
||||||
|
GROOVE_IIC(BMP280,$Z$,2)
|
||||||
|
#define _GWBMP280
|
||||||
|
#endif
|
||||||
|
|
||||||
#GROVE
|
#GROVE
|
||||||
//select up to 2 IIC devices for grove usage
|
//select up to 2 IIC devices for grove usage
|
||||||
#ifdef M5_GROOVEIIC$GS$
|
#ifdef M5_GROOVEIIC$GS$
|
||||||
|
@ -144,21 +173,4 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#GROVE
|
|
||||||
#ifdef GWBMP280G1$GS$
|
|
||||||
#ifndef M5_GROOVEIIC$GS$
|
|
||||||
#define M5_GROOVEIIC$GS$
|
|
||||||
#endif
|
|
||||||
GROOVE_IIC(BMP280,$Z$,1)
|
|
||||||
#define _GWBMP280
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#GROVE
|
|
||||||
#ifdef GWBMP280G2$GS$
|
|
||||||
#ifndef M5_GROOVEIIC$GS$
|
|
||||||
#define M5_GROOVEIIC$GS$
|
|
||||||
#endif
|
|
||||||
GROOVE_IIC(BMP280,$Z$,2)
|
|
||||||
#define _GWBMP280
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,7 @@ class BMP280Config : public IICSensorBase{
|
||||||
}
|
}
|
||||||
virtual bool isActive(){return prAct||tmAct;}
|
virtual bool isActive(){return prAct||tmAct;}
|
||||||
virtual bool initDevice(GwApi *api,TwoWire *wire){
|
virtual bool initDevice(GwApi *api,TwoWire *wire){
|
||||||
GwLog *logger=api->getLogger();
|
GwLog *logger=api->getLogger();
|
||||||
//Wire.begin(GWIIC_SDA,GWIIC_SCL);
|
|
||||||
device= new Adafruit_BMP280(wire);
|
device= new Adafruit_BMP280(wire);
|
||||||
if (! device->begin(addr)){
|
if (! device->begin(addr)){
|
||||||
LOG_DEBUG(GwLog::ERROR,"unable to initialize %s at %d",prefix.c_str(),addr);
|
LOG_DEBUG(GwLog::ERROR,"unable to initialize %s at %d",prefix.c_str(),addr);
|
||||||
|
|
|
@ -11,6 +11,17 @@ build_flags=
|
||||||
-D M5_CAN_KIT
|
-D M5_CAN_KIT
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
|
|
||||||
|
[env:m5stack-atom-env4]
|
||||||
|
extends = sensors
|
||||||
|
board = m5stack-atom
|
||||||
|
lib_deps =
|
||||||
|
${env.lib_deps}
|
||||||
|
${sensors.lib_deps}
|
||||||
|
build_flags=
|
||||||
|
-D M5_ENV4
|
||||||
|
-D M5_CAN_KIT
|
||||||
|
${env.build_flags}
|
||||||
|
|
||||||
[env:m5stack-atom-bme280]
|
[env:m5stack-atom-bme280]
|
||||||
extends = sensors
|
extends = sensors
|
||||||
board = m5stack-atom
|
board = m5stack-atom
|
||||||
|
@ -43,7 +54,6 @@ lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
${sensors.lib_deps}
|
${sensors.lib_deps}
|
||||||
build_flags=
|
build_flags=
|
||||||
#-D M5_ENVBPS
|
|
||||||
-D GWBMP280
|
-D GWBMP280
|
||||||
-D M5_GROOVEIIC
|
-D M5_GROOVEIIC
|
||||||
-D M5_CAN_KIT
|
-D M5_CAN_KIT
|
||||||
|
|
|
@ -51,6 +51,16 @@ types:
|
||||||
- value: M5_ENV3#grv#
|
- value: M5_ENV3#grv#
|
||||||
key: true
|
key: true
|
||||||
resource: qmp69881#grv#1,sht3x#grv#1
|
resource: qmp69881#grv#1,sht3x#grv#1
|
||||||
|
- label: "M5 ENV4"
|
||||||
|
type: checkbox
|
||||||
|
key: m5env4#grv#
|
||||||
|
target: define
|
||||||
|
url: "https://docs.m5stack.com/en/unit/ENV%E2%85%A3%20Unit"
|
||||||
|
description: "M5 sensor module temperature, humidity, pressure"
|
||||||
|
values:
|
||||||
|
- value: M5_ENV4#grv#
|
||||||
|
key: true
|
||||||
|
resource: bmp280#grv#1,sht3x#grv#1
|
||||||
- type: checkbox
|
- type: checkbox
|
||||||
label: SHT3X-1
|
label: SHT3X-1
|
||||||
description: "SHT30 temperature and humidity sensor 0x44"
|
description: "SHT30 temperature and humidity sensor 0x44"
|
||||||
|
@ -111,6 +121,26 @@ types:
|
||||||
- key: true
|
- key: true
|
||||||
value: GWBME280G2#grv#
|
value: GWBME280G2#grv#
|
||||||
resource: bme280#grv#2
|
resource: bme280#grv#2
|
||||||
|
- type: checkbox
|
||||||
|
label: BMP280-1
|
||||||
|
description: "BMP280 temperature/humidity/pressure sensor 0x76"
|
||||||
|
key: bmp2801g1
|
||||||
|
target: define
|
||||||
|
url: "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf"
|
||||||
|
values:
|
||||||
|
- key: true
|
||||||
|
value: GWBMP280G1#grv#
|
||||||
|
resource: bmp280#grv#1
|
||||||
|
- type: checkbox
|
||||||
|
label: BMP280-2
|
||||||
|
description: "BMP280 temperature/humidity/pressure sensor 0x77"
|
||||||
|
key: bmp2802
|
||||||
|
target: define
|
||||||
|
url: "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf"
|
||||||
|
values:
|
||||||
|
- key: true
|
||||||
|
value: GWBMP280G2#grv#
|
||||||
|
resource: bmp280#grv#2
|
||||||
|
|
||||||
|
|
||||||
- &m5groovecan
|
- &m5groovecan
|
||||||
|
@ -498,6 +528,24 @@ types:
|
||||||
values:
|
values:
|
||||||
- key: true
|
- key: true
|
||||||
value: GWBME280#busname#2
|
value: GWBME280#busname#2
|
||||||
|
- type: checkbox
|
||||||
|
label: BMP280-#busname#-1
|
||||||
|
description: "BMP280 temperature/humidity/pressure sensor 0x76"
|
||||||
|
key: bmp2801
|
||||||
|
target: define
|
||||||
|
url: "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf"
|
||||||
|
values:
|
||||||
|
- key: true
|
||||||
|
value: GWBMP280#busname#1
|
||||||
|
- type: checkbox
|
||||||
|
label: BMP280-#busname#-2
|
||||||
|
description: "BME280 temperature/humidity/pressure sensor 0x77"
|
||||||
|
key: bmp2802
|
||||||
|
target: define
|
||||||
|
url: "https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp280-ds001.pdf"
|
||||||
|
values:
|
||||||
|
- key: true
|
||||||
|
value: GWBMP280#busname#2
|
||||||
|
|
||||||
- &spisensors
|
- &spisensors
|
||||||
type: checkbox
|
type: checkbox
|
||||||
|
|
Loading…
Reference in New Issue