From bf6e586b8a41c85a2d374bbdaa07b63f724abd29 Mon Sep 17 00:00:00 2001 From: Hussein Elsherbini Date: Wed, 28 Sep 2022 16:28:18 +0000 Subject: [PATCH] Pull request #127: fixed equation Merge in WMN_TOOLS/matter from custom_examples to silabs Squashed commit of the following: commit fc2c0f65fe493c2d4a2cf5e1785d0ece0657fec5 Author: Hussein Elsherbini Date: Tue Sep 27 15:36:47 2022 -0400 fixed equation --- .../sl-newLight/efr32/light_modules/led_widget_rgb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/silabs_examples/sl-newLight/efr32/light_modules/led_widget_rgb.cpp b/silabs_examples/sl-newLight/efr32/light_modules/led_widget_rgb.cpp index 30f755ad0ce8c5..da9c2ad27dbefb 100644 --- a/silabs_examples/sl-newLight/efr32/light_modules/led_widget_rgb.cpp +++ b/silabs_examples/sl-newLight/efr32/light_modules/led_widget_rgb.cpp @@ -266,7 +266,7 @@ void LEDWidgetRGB::SetSaturation(uint8_t sat) OnOffServer::Instance().getOnOffValue(1, ¤tValue); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - this->current_saturation_ = static_cast((sat * 360) / ATTRIBUTE_LEVEL_MAX); + this->current_saturation_ = static_cast((sat * 100) / ATTRIBUTE_LEVEL_MAX); if(currentValue){ this->SetColor(this->current_hue_, this->current_saturation_, this->current_level_);