Enhance board and PSU control structures; update connector state handling and stop button logic. Adjust LED color cycles for better visual feedback. Refactor serial communication to improve state management and error handling.

This commit is contained in:
2026-05-05 17:52:14 +03:00
parent 944952689e
commit 910811df1d
19 changed files with 28054 additions and 27761 deletions
+2 -1
View File
@@ -55,7 +55,8 @@ typedef struct __attribute__((packed)) {
uint8_t stationType; // Байт 4: тип станции
uint8_t boardVersion; // Байт 5: версия платы
uint8_t addrEdcan; // Байт 6: адрес EDCAN
uint8_t reserved[57]; // Байты 7-63: зарезервированы
uint8_t maxPower; // Байт 7: максимальная мощность станции (5кВт/bit)
uint8_t reserved[56]; // Байты 8-63: зарезервированы
} InfoBlock_t;
extern InfoBlock_t *InfoBlock;
+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
+6 -5
View File
@@ -14,11 +14,12 @@ void CCS_RxEventCallback(UART_HandleTypeDef *huart, uint16_t size);
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart);
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 {