Correct few warning

This commit is contained in:
Mathieu Maret 2017-01-01 23:35:19 +01:00
parent f4541a6fd6
commit 678eafe1a5
7 changed files with 10 additions and 12 deletions

View File

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

View File

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

View File

@ -237,7 +237,7 @@ void WebHandleWifiStatus() {
message += statusToString(WiFi.status());
message += "<br/>";
if(mode == BOOTMODE_SETUP && WiFi.status() == WL_CONNECTED){
message += "Wifi correctly setup!, you can reboot now<br/>";
message += "Wifi correctly setup! You can reboot now<br/>";
message += "<a href=\"/reboot\">Reboot</a><br/>";
}
if(WiFi.status() == WL_CONNECT_FAILED || WiFi.status() == WL_NO_SSID_AVAIL){

View File

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

View File

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

View File

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