mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-24 01:18:53 -04:00
Add Yeelight music mode, enabled with "music_mode" option in Yeelight configuration. Probably only works for one light right now.
This commit is contained in:
1 parent
a5a9482206
commit
3e9993a6a4
4 files changed
+172
-20
No files matched your search
@@ -37,8 +37,14 @@ void DetectYeelightControllers(std::vector<RGBController*> &rgb_controllers)
|
||||
if(yeelight_settings["devices"][device_idx].contains("ip"))
|
||||
{
|
||||
std::string yeelight_ip = yeelight_settings["devices"][device_idx]["ip"];
|
||||
bool music_mode = false;
|
||||
|
||||
new_controller = new YeelightController(yeelight_ip);
|
||||
if(yeelight_settings["devices"][device_idx].contains("music_mode"))
|
||||
{
|
||||
music_mode = yeelight_settings["devices"][device_idx]["music_mode"];
|
||||
}
|
||||
|
||||
new_controller = new YeelightController(yeelight_ip, music_mode);
|
||||
new_rgbcontroller = new RGBController_Yeelight(new_controller);
|
||||
|
||||
rgb_controllers.push_back(new_rgbcontroller);
|
||||
|
||||
Reference in new issue
Block a user