Improve Skydimo SK0L32 serial device support

This commit is contained in:
Zoin Zoin
2026-08-27 18:15:00 -05:00
committed by Adam Honse
parent ee8d24bac6
commit 6315c79afa
3 changed files with 57 additions and 3 deletions
@@ -436,8 +436,15 @@ bool SkydimoSerialController::WriteFrame(const std::vector<RGBColor>& colors, un
packet.push_back(skydimo_serial_frame_header[header_idx]);
}
packet.push_back((unsigned char)((count >> 8) & 0xFF));
packet.push_back((unsigned char)(count & 0xFF));
/*-----------------------------------------------------*\
| Skydimo uses the Adalight length convention: the |
| 16-bit field contains the last LED index, not the |
| number of LEDs. |
\*-----------------------------------------------------*/
unsigned int frame_length = count > 0 ? count - 1 : 0;
packet.push_back((unsigned char)((frame_length >> 8) & 0xFF));
packet.push_back((unsigned char)(frame_length & 0xFF));
for(unsigned int led_idx = 0; led_idx < count; led_idx++)
{