MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / SetScene

Method SetScene

Controllers/PhilipsWizController/PhilipsWizController.cpp:129–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void PhilipsWizController::SetScene(int scene, unsigned char brightness)
130{
131 json command;
132
133 /*------------------------------------------------------------*\
134 | Fill in the setPilot command with Scene information. |
135 \*------------------------------------------------------------*/
136 command["method"] = "setPilot";
137 command["params"]["sceneId"] = scene;
138 command["params"]["dimming"] = brightness;
139
140 /*------------------------------------------------------------*\
141 | Convert the JSON object to a string and write it |
142 \*------------------------------------------------------------*/
143 std::string command_str = command.dump();
144
145 port.udp_write((char*)command_str.c_str(), command_str.length() + 1);
146}
147
148void PhilipsWizController::ReceiveThreadFunction()
149{

Callers 1

DeviceUpdateModeMethod · 0.80

Calls 2

udp_writeMethod · 0.80
dumpMethod · 0.45

Tested by

no test coverage detected