Revert "Compact some code"

Arduino Serial does not really support printf
This reverts commit 85f0bf5c78.
This commit is contained in:
Mathieu Maret 2016-06-02 00:40:35 +02:00
parent 075ed120aa
commit ff4f72e1f7

View File

@ -253,11 +253,17 @@ void loop() {
nbCycle++;
if (nbCycle > CONFIG_SAMPLING_PERIODE_MS / CONFIG_WEB_DELAY_MS) {
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);
}
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);
}
nbCycle = 0;