Add GBT_ApplyShortPacket function for immediate processing of single-frame messages from EVSE to EV. Refactor GBT_Init and GBT_ChargerTask for improved readability and functionality. Update connector initialization to set default requested limits and SOC for both connectors. Enhance logging for load enable changes.

This commit is contained in:
2026-05-12 21:18:17 +03:00
parent 7a74ef1367
commit d568fb8025
12 changed files with 187 additions and 128 deletions
+13
View File
@@ -23,6 +23,19 @@ static void CONN_UpdateEdcanOutput(void);
void CONN_Init(){
memset(&CONN, 0, sizeof(CONN));
CONN[0].connControl = CMD_NONE;
CONN[1].connControl = CMD_NONE;
/* Default requested limits are initialized once here for all connectors.
* They can be changed later only by external commands.
*/
CONN[0].RequestedCurrent = 1000;
CONN[0].RequestedVoltage = 400;
CONN[1].RequestedCurrent = 1000;
CONN[1].RequestedVoltage = 400;
/* Keep non-zero runtime defaults until external commands/measurements arrive. */
CONN[0].SOC = 50;
CONN[1].SOC = 50;
CONN[0].MeasuredVoltage = 400;
CONN[1].MeasuredVoltage = 400;
CONN_SetState(Unknown);
}