Add SET_AUX_RELAY (0xB2) to drive RELAY3 site lamp (v1.0.34).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
raduet
2026-08-26 13:57:53 +02:00
co-authored by Cursor
parent 0a37e28b14
commit efcdd4aec1
7 changed files with 6363 additions and 6340 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ extern "C" {
/* USER CODE BEGIN EC */
#define FW_VERSION_MAJOR 1
#define FW_VERSION_MINOR 0
#define FW_VERSION_PATCH 33
#define FW_VERSION_PATCH 34
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
+1
View File
@@ -23,6 +23,7 @@
// Сервисные команды
#define CMD_SET_CONFIG 0xB0
#define CMD_SET_LIGHTING 0xB1
#define CMD_SET_AUX_RELAY 0xB2 /* RELAY3 / PE10, payload 1 byte 0|1 */
// Перезагрузка для входа в бутлоадер
#define CMD_DEVICE_RESET 0xB5
+12
View File
@@ -67,6 +67,18 @@ void SC_CommandHandler(ReceivedCommand_t* cmd) {
}
response_code = RESP_FAILED;
break;
case CMD_SET_AUX_RELAY:
if (cmd->argument_length == 1) {
uint8_t state = ((uint8_t*)cmd->argument)[0];
if (state <= 1) {
RELAY_Write(RELAY3, state);
log_printf(LOG_INFO, "AUX relay RELAY3: %u\n", state);
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;
Binary file not shown.
Binary file not shown.
+3175 -3170
View File
File diff suppressed because it is too large Load Diff
+3174 -3169
View File
File diff suppressed because it is too large Load Diff