From 26d3646a4a9d918ca5d3949c7559939bf4d15bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Wed, 8 Nov 2017 09:11:43 +0100 Subject: [PATCH] Fix lightBrightnessStep --- code/espurna/light.ino | 2 +- code/espurna/light_ir.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/espurna/light.ino b/code/espurna/light.ino index e95f6a79..d867b7ba 100644 --- a/code/espurna/light.ino +++ b/code/espurna/light.ino @@ -508,7 +508,7 @@ unsigned int lightBrightness() { return _brightness; } -void lightBrightness(unsigned int b) { +void lightBrightness(int b) { _brightness = constrain(b, 0, LIGHT_MAX_BRIGHTNESS); } diff --git a/code/espurna/light_ir.ino b/code/espurna/light_ir.ino index bac6e7f1..c2f48fe7 100644 --- a/code/espurna/light_ir.ino +++ b/code/espurna/light_ir.ino @@ -834,7 +834,7 @@ unsigned int lightBrightness() { // --------------------------------------------------------------------------------------- // Set Brightness -void lightBrightness(unsigned int b) { +void lightBrightness(int b) { b=constrain(b, 0, 255); DEBUG_MSG_P(PSTR("[WEB|API] Set Brightness to : %d\n"), b); _cur_color.v=b;