Browse Source

Add check on EEPROM size

bme680_bsec
Mathieu Maret 1 year ago
parent
commit
0e3afa391b
  1. 1
      WifiControlSensor/BME680_BSEC.h
  2. 4
      WifiControlSensor/EEPROM.ino

1
WifiControlSensor/BME680_BSEC.h

@ -4,6 +4,7 @@ int BME680BSECGetMeasure(float &t, float &p, float &h, float &iaq, float &iaqAcc
int BME680BSECSetup();
bool BME680BSECIsConnected();
#else // CONFIG_ENABLE_BME680_BSEC
#define BSEC_MAX_STATE_BLOB_SIZE 0
int BME680BSECGetMeasure(float &, float &, float &, float &, float &) {
return -1;
};

4
WifiControlSensor/EEPROM.ino

@ -8,6 +8,10 @@
#define BME680_BSEC_EEPROM_ORIG (CONFIG_EEPROM_SIZE)
#if (CONFIG_EEPROM_SIZE + BSEC_MAX_STATE_BLOB_SIZE) >= SPI_FLASH_SEC_SIZE
#error "CONFIG_EEPROM_SIZE too big"
#endif
char eeprom[CONFIG_EEPROM_SIZE];
int EepromSaveConfig(productConfig &config) {

Loading…
Cancel
Save