From bd145c5449761f9c851daa4ba90aa40d0cb735ff Mon Sep 17 00:00:00 2001 From: Piotr Henryk Dabrowski Date: Mon, 18 Oct 2021 12:48:35 +0200 Subject: [PATCH] Use const instead of defines for sensors types --- DHT.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DHT.h b/DHT.h index d22c276..7c08911 100644 --- a/DHT.h +++ b/DHT.h @@ -41,11 +41,11 @@ #endif /* Define types of sensors. */ -#define DHT11 11 /**< DHT TYPE 11 */ -#define DHT12 12 /**< DHY TYPE 12 */ -#define DHT22 22 /**< DHT TYPE 22 */ -#define DHT21 21 /**< DHT TYPE 21 */ -#define AM2301 21 /**< AM2301 */ +static const uint8_t DHT11{11}; /**< DHT TYPE 11 */ +static const uint8_t DHT12{12}; /**< DHY TYPE 12 */ +static const uint8_t DHT21{21}; /**< DHT TYPE 22 */ +static const uint8_t DHT22{22}; /**< DHT TYPE 21 */ +static const uint8_t AM2301{21}; /**< AM2301 */ #if defined(TARGET_NAME) && (TARGET_NAME == ARDUINO_NANO33BLE) #ifndef microsecondsToClockCycles