Small Warning fix & print simplification
This commit is contained in:
parent
3a6987af44
commit
640db6c27d
@ -182,12 +182,10 @@ void MqttCheckSubscription() {
|
|||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while ((subscription = mqtt->readSubscription(0))) {
|
while ((subscription = mqtt->readSubscription(0))) {
|
||||||
int gpio = getGpioFromSubscription(subscription);
|
int gpio = getGpioFromSubscription(subscription);
|
||||||
SKETCH_DEBUG_PRINT("Got Subscription for gpio ");
|
SKETCH_DEBUG_PRINTF("Got Subscription for gpio %d\n", gpio);
|
||||||
SKETCH_DEBUG_PRINTLN(gpio);
|
|
||||||
if (gpio > 0 && getGpioWatchedIndex(gpio) >= 0) {
|
if (gpio > 0 && getGpioWatchedIndex(gpio) >= 0) {
|
||||||
char *value = (char *) subscription->lastread;
|
char *value = (char *) subscription->lastread;
|
||||||
SKETCH_DEBUG_PRINT("Receive data: ");
|
SKETCH_DEBUG_PRINTF("Receive data: %s\n", value);
|
||||||
SKETCH_DEBUG_PRINTLN(value);
|
|
||||||
MqttChangeGpioValue(gpio, atoi(value));
|
MqttChangeGpioValue(gpio, atoi(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,8 +164,7 @@ void OTASetup() {
|
|||||||
SKETCH_DEBUG_PRINTLN("Ready");
|
SKETCH_DEBUG_PRINTLN("Ready");
|
||||||
SKETCH_DEBUG_PRINT("IP address: ");
|
SKETCH_DEBUG_PRINT("IP address: ");
|
||||||
SKETCH_DEBUG_PRINTLN(WiFi.localIP());
|
SKETCH_DEBUG_PRINTLN(WiFi.localIP());
|
||||||
SKETCH_DEBUG_PRINT("Free Space: ");
|
SKETCH_DEBUG_PRINTF("Free Space: %d\n", ESP.getFreeSketchSpace());
|
||||||
SKETCH_DEBUG_PRINTLN(ESP.getFreeSketchSpace());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
@ -5,7 +5,7 @@ int DrySetup(int powerGPIO);
|
|||||||
int DryGetMeasure(int &dry);
|
int DryGetMeasure(int &dry);
|
||||||
bool DryIsConnected(){return true;}
|
bool DryIsConnected(){return true;}
|
||||||
#else
|
#else
|
||||||
int DrySetup(int powerGPIO){return -1;}
|
int DrySetup(int){return -1;}
|
||||||
int DryGetMeasure(int){return -1;}
|
int DryGetMeasure(int){return -1;}
|
||||||
bool DryIsConnected(){return false;}
|
bool DryIsConnected(){return false;}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user