Clamp connector current from InfoBlock connector1CurrentLimitA (v1.0.36).

This commit is contained in:
raduet
2026-09-02 17:21:35 +02:00
parent d3c9855f02
commit 644fcf1692
12 changed files with 8831 additions and 8739 deletions
+12 -6
View File
@@ -44,12 +44,18 @@ uint8_t IN_ReadInput(inputNum_t input_n);
#define VERSION_OFFSET (0x1E4)
typedef struct __attribute__((packed)) {
uint32_t serialNumber; // Байты 0-3: серийный номер станции (little-endian)
uint8_t stationType; // Байт 4: тип станции
uint8_t boardVersion; // Байт 5: версия платы
uint8_t addrEdcan; // Байт 6: адрес EDCAN
uint8_t maxPower; // Байт 7: максимальная мощность станции (5кВт/bit)
uint8_t reserved[56]; // Байты 8-63: зарезервированы
uint32_t serialNumber; // Байты 0-3
uint8_t stationType; // Байт 4
uint8_t boardVersion; // Байт 5
uint8_t addrEdcan; // Байт 6
uint8_t maxPower; // Байт 7
uint8_t pad[7]; // bytes 8-14, see edcan.h
uint16_t connector1CurrentLimitA; // Байты 15-16, A; 0 = legacy PSU_MAX_CURRENT
uint8_t reserved[45]; // Байты 17-63
} InfoBlock_t;
extern InfoBlock_t *InfoBlock;
void Board_LoadInfoBlockLimits(void);
uint16_t Board_GetConnectorCurrentLimit_0p1A(void);
uint16_t Board_ClampCurrent_0p1A(uint16_t current_0p1A);
+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 35
#define FW_VERSION_PATCH 36
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
+1
View File
@@ -7,6 +7,7 @@
void CCS_SerialLoop(void);
void CCS_Init(void);
void CCS_UpdateMaxLoadFromInfoBlock(void);
void CCS_SendEmergencyStop(void);
void CCS_SendStart(void);
void CCS_RxEventCallback(UART_HandleTypeDef *huart, uint16_t size);