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
+9
View File
@@ -5,6 +5,7 @@
#include "debug.h"
#include "fire_alarm.h"
#include "psu_control.h"
#include "rgb_controller.h"
#include "usart.h"
#include <string.h>
@@ -58,6 +59,14 @@ void SC_CommandHandler(ReceivedCommand_t* cmd) {
}
response_code = RESP_FAILED;
break;
case CMD_SET_LIGHTING:
if (cmd->argument_length == sizeof(LightingConfigPacket_t) &&
LED_ApplyLightingConfig((const LightingConfigPacket_t *)cmd->argument)) {
response_code = RESP_SUCCESS;
break;
}
response_code = RESP_FAILED;
break;
case CMD_SET_POWER_LIMIT:
if (cmd->argument_length == 1) {
PSU0.power_limit = ((uint8_t*)cmd->argument)[0] * 1000;