zestyping / openpixelcontrol

A simple stream protocol for controlling arrays of RGB lights.
http://openpixelcontrol.org/
353 stars 103 forks source link

Documentation and code mismatch #50

Open drzony opened 4 years ago

drzony commented 4 years ago

I'm incorporating a OPC server into my smart light project. I want to do my own implementation based on spec, but it seems that there is a mismatch.

On http://openpixelcontrol.org/ the spec says:

System exclusive (command 255): Command 0xff is used to send a message that is specific to a particular device or software system. The data block should begin with a two-byte system ID; designers of that system are then free to define any message format for the rest of the data block.

In opc.h we have:

#define OPC_STREAM_SYNC 0xff

#define OPC_STREAM_SYNC_LENGTH 4
#define OPC_STREAM_SYNC_DATA ((u8*) "\xf0\xca\x71\x2e")

How should I handle the Stream Sync command? From the code it seems it's only a kind of keep-alive (data is never read)