Browse Source

Add check on EEPROM size

bme680_bsec
Mathieu Maret 11 months ago
parent
commit
0e3afa391b
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      WifiControlSensor/BME680_BSEC.h
  2. +4
    -0
      WifiControlSensor/EEPROM.ino

+ 1
- 0
WifiControlSensor/BME680_BSEC.h View File

@ -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
- 0
WifiControlSensor/EEPROM.ino View File

@ -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