Compact some code
This commit is contained in:
parent
26d3deee0e
commit
85f0bf5c78
@ -265,17 +265,11 @@ void loop() {
|
||||
nbCycle++;
|
||||
if (nbCycle > CONFIG_SAMPLING_PERIODE_MS / CONFIG_WEB_DELAY_MS) {
|
||||
if (BMP180GetTempAndPressure(temp, pressure) == 0) {
|
||||
SKETCH_DEBUG_PRINT("Current T°C ");
|
||||
SKETCH_DEBUG_PRINT(temp);
|
||||
SKETCH_DEBUG_PRINT(" Pressure mB ");
|
||||
SKETCH_DEBUG_PRINTLN(pressure);
|
||||
SKETCH_DEBUG_PRINTF("Current T°C %f Pressure %f\n", temp, pressure);
|
||||
MqttPublish(temp, pressure);
|
||||
}
|
||||
if (DHTGetTempAndHumidity(dhtTemp, dhtHumidity) == 0) {
|
||||
SKETCH_DEBUG_PRINT("Current T°C ");
|
||||
SKETCH_DEBUG_PRINT(dhtTemp);
|
||||
SKETCH_DEBUG_PRINT(" Humidity ");
|
||||
SKETCH_DEBUG_PRINTLN(dhtHumidity);
|
||||
SKETCH_DEBUG_PRINTF("Current T°C %f Humidity %f\n", dhtTemp, dhtHumidity);
|
||||
MqttDhtPublish(dhtTemp, dhtHumidity);
|
||||
}
|
||||
nbCycle = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user