diff --git a/WifiControlSensor/MQTT.ino b/WifiControlSensor/MQTT.ino index 0c3aeb9..afd5ec2 100644 --- a/WifiControlSensor/MQTT.ino +++ b/WifiControlSensor/MQTT.ino @@ -182,12 +182,10 @@ void MqttCheckSubscription() { Adafruit_MQTT_Subscribe *subscription; while ((subscription = mqtt->readSubscription(0))) { int gpio = getGpioFromSubscription(subscription); - SKETCH_DEBUG_PRINT("Got Subscription for gpio "); - SKETCH_DEBUG_PRINTLN(gpio); + SKETCH_DEBUG_PRINTF("Got Subscription for gpio %d\n", gpio); if (gpio > 0 && getGpioWatchedIndex(gpio) >= 0) { char *value = (char *) subscription->lastread; - SKETCH_DEBUG_PRINT("Receive data: "); - SKETCH_DEBUG_PRINTLN(value); + SKETCH_DEBUG_PRINTF("Receive data: %s\n", value); MqttChangeGpioValue(gpio, atoi(value)); } } diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index 146c562..ba075ac 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -164,8 +164,7 @@ void OTASetup() { SKETCH_DEBUG_PRINTLN("Ready"); SKETCH_DEBUG_PRINT("IP address: "); SKETCH_DEBUG_PRINTLN(WiFi.localIP()); - SKETCH_DEBUG_PRINT("Free Space: "); - SKETCH_DEBUG_PRINTLN(ESP.getFreeSketchSpace()); + SKETCH_DEBUG_PRINTF("Free Space: %d\n", ESP.getFreeSketchSpace()); } void setup() { diff --git a/WifiControlSensor/dry_sensor.h b/WifiControlSensor/dry_sensor.h index 11105a9..76ce708 100644 --- a/WifiControlSensor/dry_sensor.h +++ b/WifiControlSensor/dry_sensor.h @@ -5,7 +5,7 @@ int DrySetup(int powerGPIO); int DryGetMeasure(int &dry); bool DryIsConnected(){return true;} #else -int DrySetup(int powerGPIO){return -1;} +int DrySetup(int){return -1;} int DryGetMeasure(int){return -1;} bool DryIsConnected(){return false;} #endif