Add SET_LIGHTING (0xB1) and AC22-style init LED shimmer.

Mutable status palette over serial; Unknown uses HSV saturation pulse instead of dim-red/fade-to-black.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
raduet
2026-07-30 17:12:09 +02:00
co-authored by Cursor
parent 940e3f4a3d
commit b98207da4c
9 changed files with 7690 additions and 7391 deletions
+22
View File
@@ -22,6 +22,7 @@
// Сервисные команды
#define CMD_SET_CONFIG 0xB0
#define CMD_SET_LIGHTING 0xB1
// Перезагрузка для входа в бутлоадер
#define CMD_DEVICE_RESET 0xB5
@@ -147,6 +148,27 @@ typedef struct __attribute__((packed)) {
} ConfigBlock_t;
typedef struct __attribute__((packed)) {
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t brightness;
uint8_t effect;
uint8_t speed;
uint8_t fadeTo;
} LightingRolePacket_t;
typedef struct __attribute__((packed)) {
uint8_t mode;
uint8_t flags;
uint8_t previewSec;
uint8_t reserved;
LightingRolePacket_t roles[5];
} LightingConfigPacket_t;
_Static_assert(sizeof(LightingRolePacket_t) == 7, "Lighting role packet must be 7 bytes");
_Static_assert(sizeof(LightingConfigPacket_t) == 39, "Lighting config packet must be 39 bytes");
// Предварительное объявление структуры протокола
typedef struct SerialControl_t SerialControl_t;