Update firmware version to 1.0.10, add hv_tick parameter to PSU control, enhance serial control with response handling, and improve stop button control logic.

This commit is contained in:
2026-04-13 20:01:44 +03:00
parent 14b4f0595f
commit c59d150b23
21 changed files with 25914 additions and 25379 deletions
+3 -3
View File
@@ -41,9 +41,9 @@ extern "C" {
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
#define FW_VERSION_MAJOR 0x01
#define FW_VERSION_MINOR 0x00
#define FW_VERSION_PATCH 0x02
#define FW_VERSION_MAJOR 1
#define FW_VERSION_MINOR 0
#define FW_VERSION_PATCH 10
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
+1
View File
@@ -88,6 +88,7 @@ typedef struct {
// Дополнительные параметры для одного модуля DC30
uint32_t power_limit; // лимит мощности [кВт]
uint8_t hv_mode; // HV-режим (ограничение напряжения)
uint32_t hv_tick; // таймер для задержки входа в HV-режим
uint32_t tempAmbient; // температура окружающего воздуха (из PSU_04)
union { uint8_t raw; PSU_Status0_t bits; } status0; // modularForm0
+7 -5
View File
@@ -11,13 +11,15 @@ void CCS_Init(void);
void CCS_SendEmergencyStop(void);
void CCS_SendStart(void);
void CCS_RxEventCallback(UART_HandleTypeDef *huart, uint16_t size);
void CCS_RxArm(void);
typedef enum {
CCS_DISABLED = 0,
CCS_UNPLUGGED = 1,
CCS_AUTH_REQUIRED = 2,
CCS_CONNECTED = 3,
CCS_REPLUGGING = 4,
CCS_UNKNOWN = 0,
CCS_DISABLED = 1,
CCS_UNPLUGGED = 2,
CCS_AUTH_REQUIRED = 3,
CCS_CONNECTED = 4,
CCS_REPLUGGING = 5,
} CCS_ConnectorState_t;
typedef enum {
+4
View File
@@ -159,6 +159,10 @@ struct SerialControl_t {
// Переменные для передачи команды
volatile ReceivedCommand_t received_command;
volatile uint8_t command_ready;
volatile uint8_t response_pending;
volatile uint8_t response_code;
volatile uint8_t rx_error_pending;
volatile uint32_t rx_error_code;
// Время отправки последнего пакета
volatile uint32_t tx_tick;