| 177 | } |
| 178 | |
| 179 | int 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 | |
| 194 | qint64 DriverNetFadeCandy::transferData() |
| 195 | { |
no outgoing calls
no test coverage detected