From 7e09195083979a09624c7b64e946961a0f7698c7 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Sat, 1 Dec 2018 19:16:32 -0300 Subject: [PATCH] Delete duplicated min and max functions --- sonoff/xplg_wemohue.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sonoff/xplg_wemohue.ino b/sonoff/xplg_wemohue.ino index 6c031fd94..64ac969ae 100644 --- a/sonoff/xplg_wemohue.ino +++ b/sonoff/xplg_wemohue.ino @@ -17,8 +17,8 @@ along with this program. If not, see . */ -#define min(a,b) ((a)<(b)?(a):(b)) -#define max(a,b) ((a)>(b)?(a):(b)) +//#define min(a,b) ((a)<(b)?(a):(b)) +//#define max(a,b) ((a)>(b)?(a):(b)) #if defined(USE_WEBSERVER) && defined(USE_EMULATION) /*********************************************************************************************\ @@ -692,8 +692,8 @@ void HueLights(String *path) if (hue_json.containsKey("bri")) { // Brightness is a scale from 1 (the minimum the light is capable of) to 254 (the maximum). Note: a brightness of 1 is not off. tmp = hue_json["bri"]; - tmp = max(tmp, 1); - tmp = min(tmp, 254); + tmp = tmax(tmp, 1); + tmp = tmin(tmp, 254); bri = (float)tmp / 254.0f; if (resp) { response += ","; @@ -721,8 +721,8 @@ void HueLights(String *path) } if (hue_json.containsKey("sat")) { // Saturation of the light. 254 is the most saturated (colored) and 0 is the least saturated (white). tmp = hue_json["sat"]; - tmp = max(tmp, 0); - tmp = min(tmp, 254); + tmp = tmax(tmp, 0); + tmp = tmin(tmp, 254); sat = (float)tmp / 254.0f; if (resp) { response += ",";