37
37
*/
38
38
39
39
// Enable debug prints to serial monitor
40
- #define MY_DEBUG
40
+ // #define MY_DEBUG
41
41
42
42
// Enable and select radio type attached
43
43
#define MY_RADIO_NRF24
@@ -227,9 +227,11 @@ bool updatePressureSensor()
227
227
{
228
228
changed = true ;
229
229
lastPressureTemp = temperature;
230
+ #ifdef MY_DEBUG
230
231
Serial.print (F (" Temperature = " ));
231
232
Serial.print (temperature);
232
233
Serial.println (metric ? F (" *C" ) : F (" *F" ));
234
+ #endif
233
235
if (!send (tempMsg.set (lastPressureTemp, 1 )))
234
236
{
235
237
lastPressureTemp = -1.0 ;
@@ -240,9 +242,11 @@ bool updatePressureSensor()
240
242
{
241
243
changed = true ;
242
244
lastPressure = pressure;
245
+ #ifdef MY_DEBUG
243
246
Serial.print (F (" sealevel Pressure = " ));
244
247
Serial.print (pressure);
245
248
Serial.println (F (" hPa" ));
249
+ #endif
246
250
if (!send (pressureMsg.set (lastPressure, 1 )))
247
251
{
248
252
lastPressure = -1.0 ;
@@ -253,8 +257,10 @@ bool updatePressureSensor()
253
257
{
254
258
changed = true ;
255
259
lastForecast = forecast;
260
+ #ifdef MY_DEBUG
256
261
Serial.print (F (" Forecast = " ));
257
262
Serial.println (weatherStrings[forecast]);
263
+ #endif
258
264
if (send (forecastMsg.set (weatherStrings[lastForecast])))
259
265
{
260
266
if (!send (forecastMsg2.set (lastForecast)))
@@ -271,8 +277,10 @@ bool updatePressureSensor()
271
277
{
272
278
changed = true ;
273
279
lastSituation = situation;
280
+ #ifdef MY_DEBUG
274
281
Serial.print (F (" Situation = " ));
275
282
Serial.println (situationStrings[situation]);
283
+ #endif
276
284
if (!send (situationMsg.set (lastSituation, 0 )))
277
285
{
278
286
lastSituation = -1.0 ;
@@ -302,8 +310,10 @@ bool updateHumiditySensor()
302
310
}
303
311
304
312
changed = true ;
313
+ #ifdef MY_DEBUG
305
314
Serial.print (F (" T: " ));
306
315
Serial.println (temperature);
316
+ #endif
307
317
if (!send (msgTemp.set (temperature, 1 )))
308
318
{
309
319
lastTemp = -1.0 ;
@@ -322,8 +332,10 @@ bool updateHumiditySensor()
322
332
{
323
333
lastHum = humidity;
324
334
changed = true ;
335
+ #ifdef MY_DEBUG
325
336
Serial.print (F (" H: " ));
326
337
Serial.println (humidity);
338
+ #endif
327
339
if (!send (msgHum.set (lastHum, 1 )))
328
340
{
329
341
lastHum = -1.0 ;
0 commit comments