forked from achamaikin/CCSModuleSW30Web
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user