diff --git a/WifiControlSensor/BMP180.h b/WifiControlSensor/BMP180.h
index 42ee435..b742259 100644
--- a/WifiControlSensor/BMP180.h
+++ b/WifiControlSensor/BMP180.h
@@ -11,8 +11,8 @@ int BMP180Setup(int sda, int scl);
bool BMP180IsConnected();
#else //CONFIG_ENABLE_BMP80
-int BMP180GetTemperature(double &t){return -1;};
-int BMP180GetTempAndPressure(double &t, double &p){return -1;};
+int BMP180GetTemperature(double &){return -1;};
+int BMP180GetTempAndPressure(double &, double &){return -1;};
int BMP180Setup(int , int ){SKETCH_DEBUG_PRINTLN("BMP180 is disabled at build time"); return -1;};
bool BMP180IsConnected(){return false;};
#endif
diff --git a/WifiControlSensor/MQTT.h b/WifiControlSensor/MQTT.h
index 33c1ef1..257a1e1 100644
--- a/WifiControlSensor/MQTT.h
+++ b/WifiControlSensor/MQTT.h
@@ -15,7 +15,6 @@ void MqttCheckSubscription();
void MqttCheckIRQ();
void MqttChangeGpioValue(int gpio, int value);
void MqttChangePWMValue(int gpio, int value);
-bool MqttIsConfigured();
void MqttNofityIRQ(uint8_t gpio, int value);
void MqttNofity(int gpio, int value);
#else
@@ -31,7 +30,6 @@ void MqttCheckSubscription(){}
void MqttCheckIRQ(){}
void MqttChangeGpioValue(int gpio, int value){}
void MqttChangePWMValue(int gpio, int value){}
-bool MqttIsConfigured(){}
void MqttNofityIRQ(uint8_t gpio, int value){}
void MqttNofity(int gpio, int value){}
#endif
diff --git a/WifiControlSensor/WebServer.ino b/WifiControlSensor/WebServer.ino
index 2c857d8..09ed6cd 100644
--- a/WifiControlSensor/WebServer.ino
+++ b/WifiControlSensor/WebServer.ino
@@ -237,7 +237,7 @@ void WebHandleWifiStatus() {
message += statusToString(WiFi.status());
message += "
";
if(mode == BOOTMODE_SETUP && WiFi.status() == WL_CONNECTED){
- message += "Wifi correctly setup!, you can reboot now
";
+ message += "Wifi correctly setup! You can reboot now
";
message += "Reboot
";
}
if(WiFi.status() == WL_CONNECT_FAILED || WiFi.status() == WL_NO_SSID_AVAIL){
diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino
index a9064de..78cad20 100644
--- a/WifiControlSensor/WifiControlSensor.ino
+++ b/WifiControlSensor/WifiControlSensor.ino
@@ -99,7 +99,7 @@ void onLongButtonPressed(uint8_t pin){
void WifiSetup(productConfig conf) {
IPAddress myIP;
if (conf.bootMode == BOOTMODE_SETUP) {
- SKETCH_DEBUG_PRINTLN("Configuring access point: "CONFIG_SSID_NAME);
+ SKETCH_DEBUG_PRINTLN("Configuring access point: " CONFIG_SSID_NAME);
/* You can set a password to the AP here */
WiFi.softAP(CONFIG_SSID_NAME);
myIP = WiFi.softAPIP();
diff --git a/WifiControlSensor/dry_sensor.h b/WifiControlSensor/dry_sensor.h
index 76ce708..15a9f18 100644
--- a/WifiControlSensor/dry_sensor.h
+++ b/WifiControlSensor/dry_sensor.h
@@ -3,9 +3,7 @@
#ifdef CONFIG_ENABLE_DRY_SENSOR
int DrySetup(int powerGPIO);
int DryGetMeasure(int &dry);
-bool DryIsConnected(){return true;}
#else
int DrySetup(int){return -1;}
int DryGetMeasure(int){return -1;}
-bool DryIsConnected(){return false;}
#endif
diff --git a/WifiControlSensor/sensor_DHT.h b/WifiControlSensor/sensor_DHT.h
index 1419adc..49ca648 100644
--- a/WifiControlSensor/sensor_DHT.h
+++ b/WifiControlSensor/sensor_DHT.h
@@ -8,7 +8,7 @@ int DHTGetTempAndHumidity(float &t, float &h);
bool DHTIsConnected();
#else //CONFIG_ENABLE_DHT
-int DHTSetup(int pin){SKETCH_DEBUG_PRINTLN("DHT is disabled at build time"); return -1;};
-int DHTGetTempAndHumidity(float &t, float &h){return -1;};
+int DHTSetup(int){SKETCH_DEBUG_PRINTLN("DHT is disabled at build time"); return -1;};
+int DHTGetTempAndHumidity(float &, float &){return -1;};
bool DHTIsConnected(){return false;};
#endif
diff --git a/WifiControlSensor/utils.h b/WifiControlSensor/utils.h
index fd8bcb7..bc9ee75 100644
--- a/WifiControlSensor/utils.h
+++ b/WifiControlSensor/utils.h
@@ -5,8 +5,10 @@
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
-int findIndex(int el, const int array[]){
- for ( uint i = 0; i < NB_ELEMENTS(array); i++) {
+#define findIndex(x,y) findIdx(x, y, NB_ELEMENTS((y)))
+
+int findIdx(int el, const int array[], uint size){
+ for (uint i = 0; i < size; i++) {
if (el == array[i])
return i;
}