From 2623b3c97c27d591ef2918f1f2639c4ecb66222f Mon Sep 17 00:00:00 2001 From: Stefan Ostermann Date: Fri, 14 May 2021 15:02:11 +0200 Subject: [PATCH] define for config values --- sensor433/src/config.h.example | 2 +- sensor433/src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sensor433/src/config.h.example b/sensor433/src/config.h.example index b41fedb..7746180 100644 --- a/sensor433/src/config.h.example +++ b/sensor433/src/config.h.example @@ -15,6 +15,6 @@ #define WATCHDOG_SLEEP_FURTHER 8 // define wether to use a DHT-Sensor or not -bool USE_DHT_SENSOR = true; +#define USE_DHT_SENSOR true; #endif \ No newline at end of file diff --git a/sensor433/src/main.cpp b/sensor433/src/main.cpp index 5f2c269..37b6dd1 100644 --- a/sensor433/src/main.cpp +++ b/sensor433/src/main.cpp @@ -68,7 +68,7 @@ void setup() pinMode(SOIL_PIN, INPUT); // init the DHT22 - if (USE_DHT_SENSOR == 1) + if (USE_DHT_SENSOR) { dht_init(&dht, DHT_PIN); } @@ -115,7 +115,7 @@ void loop() memcpy(&rh_buf[1], &battery, 4); rh_send(rh_buf,RH_BUF_LEN); } - else if (USE_DHT_SENSOR == 1) + else if (USE_DHT_SENSOR) { if (dht_read_data(&dht, &t, &h) == 1) {