From 72cdb70f746f70701e414d9fe8dde91f8c9b5ba0 Mon Sep 17 00:00:00 2001 From: Virtual Maker <56232456+virtual-maker@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:08:48 +0100 Subject: [PATCH] Update macro conditions for ESP8266 and ESP32 #### Modify `min` and `max` macro definitions in `MySensors.h` to exclude ESP8266 and ESP32 architectures. This change prevents potential redefinition errors or conflicts when compiling for these specific architectures. --- MySensors.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MySensors.h b/MySensors.h index ec01be347..9c86bba8f 100644 --- a/MySensors.h +++ b/MySensors.h @@ -96,11 +96,11 @@ #define _BV(x) (1<<(x)) //!< _BV #endif -#if !defined(min) && !defined(__linux__) +#if !defined(min) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32) #define min(a,b) ((a)<(b)?(a):(b)) //!< min #endif -#if !defined(max) && !defined(__linux__) +#if !defined(max) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32) #define max(a,b) ((a)>(b)?(a):(b)) //!< max #endif