1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 06:53:07 +01:00

add some compile time checks for necessary i2c definitions

This commit is contained in:
andreas
2023-11-04 20:07:15 +01:00
parent 83e181fa59
commit cf1e0d1224
5 changed files with 36 additions and 4 deletions

View File

@@ -176,11 +176,13 @@ class BME280Config : public SensorBase{
}
};
void registerBME280(GwApi *api,SensorList &sensors){
#if defined(GWBME280) || defined(GWBME28011)
{
BME280Config *cfg=new BME280Config(api,PRFX1);
sensors.add(api,cfg);
CHECK_IIC1();
#pragma message "GWBME28011 defined"
}
#endif
@@ -188,6 +190,7 @@ void registerBME280(GwApi *api,SensorList &sensors){
{
BME280Config *cfg=new BME280Config(api,PRFX2);
sensors.add(api,cfg);
CHECK_IIC1();
#pragma message "GWBME28012 defined"
}
#endif
@@ -195,6 +198,7 @@ void registerBME280(GwApi *api,SensorList &sensors){
{
BME280Config *cfg=new BME280Config(api,PRFX3);
sensors.add(api,cfg);
CHECK_IIC2();
#pragma message "GWBME28021 defined"
}
#endif
@@ -202,6 +206,7 @@ void registerBME280(GwApi *api,SensorList &sensors){
{
BME280Config *cfg=new BME280Config(api,PRFX4);
sensors.add(api,cfg);
CHECK_IIC1();
#pragma message "GWBME28022 defined"
}
#endif