From 8302b1f762740eef72a49343752fa521057540e6 Mon Sep 17 00:00:00 2001 From: Harald Pichler Date: Tue, 27 Sep 2016 17:03:15 +0200 Subject: [PATCH] bugfix constrain return value --- examples/osd/triggerbaord/ChainableLED.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/osd/triggerbaord/ChainableLED.cpp b/examples/osd/triggerbaord/ChainableLED.cpp index e63bec175..7a1abbbd9 100644 --- a/examples/osd/triggerbaord/ChainableLED.cpp +++ b/examples/osd/triggerbaord/ChainableLED.cpp @@ -135,9 +135,9 @@ void ChainableLED::setColorHSB(byte led, float hue, float saturation, float brig { float r, g, b; - constrain(hue, 0.0, 1.0); - constrain(saturation, 0.0, 1.0); - constrain(brightness, 0.0, 1.0); + hue=constrain(hue, 0.0, 1.0); + saturation=constrain(saturation, 0.0, 1.0); + brightness=constrain(brightness, 0.0, 1.0); if(saturation == 0.0) {