Skip to content

Commit

Permalink
Pull request #127: fixed equation
Browse files Browse the repository at this point in the history
Merge in WMN_TOOLS/matter from custom_examples to silabs

Squashed commit of the following:

commit fc2c0f65fe493c2d4a2cf5e1785d0ece0657fec5
Author: Hussein Elsherbini <[email protected]>
Date:   Tue Sep 27 15:36:47 2022 -0400

    fixed equation
  • Loading branch information
HusseinElsherbini authored and jmartinez-silabs committed Oct 26, 2022
1 parent 10939f0 commit bf6e586
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void LEDWidgetRGB::SetSaturation(uint8_t sat)
OnOffServer::Instance().getOnOffValue(1, &currentValue);
chip::DeviceLayer::PlatformMgr().UnlockChipStack();

this->current_saturation_ = static_cast<uint16_t>((sat * 360) / ATTRIBUTE_LEVEL_MAX);
this->current_saturation_ = static_cast<uint16_t>((sat * 100) / ATTRIBUTE_LEVEL_MAX);
if(currentValue){

this->SetColor(this->current_hue_, this->current_saturation_, this->current_level_);
Expand Down

0 comments on commit bf6e586

Please sign in to comment.