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:
+6
-10
@@ -213,19 +213,15 @@ static void J1939_ProcessRxFrame(const j1939_rx_frame_t *frame){
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if(j_rx.state == 0){
|
||||
j_rx.size = frame->DLC;
|
||||
j_rx.packet = 1;
|
||||
j_rx.packets = 1;
|
||||
j_rx.step = 1;
|
||||
j_rx.step_cts_remain = 0;
|
||||
j_rx.PGN = (frame->ExtId >> 8) & 0x00FF00;
|
||||
j_rx.state = 2;
|
||||
memcpy(j_rx.data, frame->data, j_rx.size);
|
||||
default:{
|
||||
uint32_t short_pgn = (frame->ExtId >> 8) & 0x00FF00U;
|
||||
/* Однокадровые PGN обрабатываем сразу; j_rx зарезервирован только под TP RX. */
|
||||
if((short_pgn != 0xEC00U) && (short_pgn != 0xEB00U)){
|
||||
GBT_ApplyShortPacket(short_pgn, frame->data, frame->DLC);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void J1939_ExchangeRxBuffer(void){
|
||||
|
||||
Reference in New Issue
Block a user