add cleanFS into user config and correct missing rf315 subject subscribe

This commit is contained in:
Florian
2018-06-07 20:20:11 +02:00
parent eb15898228
commit 76859e54fe
3 changed files with 10 additions and 4 deletions

View File

@@ -186,6 +186,9 @@ boolean reconnect() {
#ifdef ZgatewayRF
client.subscribe(subjectMultiGTWRF);
#endif
#ifdef ZgatewayRF315
client.subscribe(subjectMultiGTWRF315);
#endif
#ifdef ZgatewayIR
client.subscribe(subjectMultiGTWIR);
#endif
@@ -395,9 +398,10 @@ void setup_wifi() {
#elif defined(ESP8266) && !defined(ESPWifiManualSetup)
void setup_wifimanager(boolean reset_settings){
#ifdef cleanFS
//clean FS, for testing
//SPIFFS.format();
#endif
//read configuration from FS json
trc("mounting FS...");
@@ -736,7 +740,7 @@ void stateMeasures(){
}
#endif
void storeValue(long MQTTvalue){
void storeValue(unsigned long MQTTvalue){
unsigned long now = millis();
// find oldest value of the buffer
int o = getMin();
@@ -768,7 +772,7 @@ int getMin(){
}
boolean isAduplicate(unsigned long value){
trc(F("isAduplicate"));
trc(F("isAduplicate?"));
// check if the value has been already sent during the last time_avoid_duplicate
for (int i = 0; i < array_size;i++){
if (ReceivedSignal[i][0] == value){

View File

@@ -52,7 +52,8 @@ char mqtt_port[6] = "1883";
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
#define WifiManager_password "your_password"
//#define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
//#define MDNS_SD //uncomment if you want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
//#define cleanFS //uncomment if you want to clean the ESP memory and reenter your credentials
//set minimum quality of signal so it ignores AP's under that quality
#define MinimumWifiSignalQuality 8

View File

@@ -52,6 +52,7 @@ char mqtt_port[6] = "1883";
//#define ESPWifiManualSetup true //uncomment you don't want to use wifimanager for your credential settings on ESP
#define WifiManager_password "your_password"
//#define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work
//#define cleanFS //uncomment if you want to clean the ESP memory and reenter your credentials
//set minimum quality of signal so it ignores AP's under that quality
#define MinimumWifiSignalQuality 8