Revert "Compact some code"
Arduino Serial does not really support printf
This reverts commit 85f0bf5c78
.
This commit is contained in:
parent
075ed120aa
commit
ff4f72e1f7
@ -253,11 +253,17 @@ void loop() {
|
|||||||
nbCycle++;
|
nbCycle++;
|
||||||
if (nbCycle > CONFIG_SAMPLING_PERIODE_MS / CONFIG_WEB_DELAY_MS) {
|
if (nbCycle > CONFIG_SAMPLING_PERIODE_MS / CONFIG_WEB_DELAY_MS) {
|
||||||
if (BMP180GetTempAndPressure(temp, pressure) == 0) {
|
if (BMP180GetTempAndPressure(temp, pressure) == 0) {
|
||||||
SKETCH_DEBUG_PRINTF("Current T°C %f Pressure %f\n", temp, pressure);
|
SKETCH_DEBUG_PRINT("Current T°C ");
|
||||||
|
SKETCH_DEBUG_PRINT(temp);
|
||||||
|
SKETCH_DEBUG_PRINT(" Pressure mB ");
|
||||||
|
SKETCH_DEBUG_PRINTLN(pressure);
|
||||||
MqttPublish(temp, pressure);
|
MqttPublish(temp, pressure);
|
||||||
}
|
}
|
||||||
if (DHTGetTempAndHumidity(dhtTemp, dhtHumidity) == 0) {
|
if (DHTGetTempAndHumidity(dhtTemp, dhtHumidity) == 0) {
|
||||||
SKETCH_DEBUG_PRINTF("Current T°C %f Humidity %f\n", dhtTemp, dhtHumidity);
|
SKETCH_DEBUG_PRINT("Current T°C ");
|
||||||
|
SKETCH_DEBUG_PRINT(dhtTemp);
|
||||||
|
SKETCH_DEBUG_PRINT(" Humidity ");
|
||||||
|
SKETCH_DEBUG_PRINTLN(dhtHumidity);
|
||||||
MqttDhtPublish(dhtTemp, dhtHumidity);
|
MqttDhtPublish(dhtTemp, dhtHumidity);
|
||||||
}
|
}
|
||||||
nbCycle = 0;
|
nbCycle = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user