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

Method write

sources/led-drivers/net/DriverNetFadeCandy.cpp:179–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179int DriverNetFadeCandy::write(const std::vector<ColorRgb>& ledValues)
180{
181 uint idx = OPC_HEADER_SIZE;
182 for (const ColorRgb& color : ledValues)
183 {
184 _opc_data[idx] = static_cast<char>(color.red);
185 _opc_data[idx + 1] = static_cast<char>(color.green);
186 _opc_data[idx + 2] = static_cast<char>(color.blue);
187 idx += 3;
188 }
189
190 int retval = transferData() < 0 ? -1 : 0;
191 return retval;
192}
193
194qint64 DriverNetFadeCandy::transferData()
195{

Callers 2

transferDataMethod · 0.45
sendSysExMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected