MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / setColor

Method setColor

sources/api/BaseAPI.cpp:203–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void BaseAPI::setColor(int priority, const std::vector<uint8_t>& ledColors, int timeout_ms, const QString& origin, hyperhdr::Components callerComp)
204{
205 std::vector<ColorRgb> fledColors;
206 if (ledColors.size() % 3 == 0)
207 {
208 for (uint64_t i = 0; i < ledColors.size(); i += 3)
209 {
210 fledColors.emplace_back(ColorRgb{ ledColors[i], ledColors[i + 1], ledColors[i + 2] });
211 }
212 QUEUE_CALL_4(_hyperhdr.get(), setColor, int, priority, std::vector<ColorRgb>, fledColors, int, timeout_ms, QString, origin);
213 }
214}
215
216bool BaseAPI::setImage(ImageCmdData& data, hyperhdr::Components comp, QString& replyMsg, hyperhdr::Components callerComp)
217{

Callers 2

jsoneditor.min.jsFile · 0.45

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected