mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-28 10:51:13 -04:00
Fix some issues with Yeelight that prevented a different model bulb from working
This commit is contained in:
@@ -158,7 +158,7 @@ void YeelightController::SetPower()
|
||||
\*-----------------------------------------------------------------*/
|
||||
command["id"] = 1;
|
||||
command["method"] = "set_power";
|
||||
command["params"][0] = 1;
|
||||
command["params"][0] = "on";
|
||||
command["params"][1] = "sudden";
|
||||
command["params"][2] = 0;
|
||||
command["params"][3] = 2;
|
||||
@@ -208,7 +208,7 @@ void YeelightController::SetColor(unsigned char red, unsigned char green, unsign
|
||||
| set_cf option provides both RGB and brightness in one command, it |
|
||||
| allows better RGB control than the set_rgb function. |
|
||||
\*-----------------------------------------------------------------*/
|
||||
std::string cf = "\"0,1," + std::to_string(rgb) +"," + std::to_string(bright) +"\"";
|
||||
std::string cf = "50,1," + std::to_string(rgb) +"," + std::to_string((int)bright);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| Fill in the set_cf command with the color flow string. |
|
||||
|
||||
Reference in New Issue
Block a user