Merge achamaikin/CCSModuleSW30Web upstream with fire alarm retained.
Take upstream board rev2, heater, and project cleanup; preserve fire alarm latch, CMD_FIRE_ALARM, and ESTOP maintenance logic. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
|
||||
#include "charger_control.h"
|
||||
|
||||
#include "charger_config.h"
|
||||
#include "psu_control.h"
|
||||
#include "connector.h"
|
||||
#include "debug.h"
|
||||
#include "fire_alarm.h"
|
||||
#include "psu_control.h"
|
||||
|
||||
ChargingConnector_t CONN;
|
||||
CONN_State_t connectorState;
|
||||
extern uint8_t config_initialized;
|
||||
|
||||
void CONN_Init(){
|
||||
|
||||
@@ -36,24 +34,16 @@ void CONN_Loop(){
|
||||
CONN.chargingError = CONN_ERR_CONTACTOR;
|
||||
} else if(PSU0.psu_fault){
|
||||
CONN.chargingError = CONN_ERR_PSU_FAULT;
|
||||
// } else if(!CTRL.ac_ok) {
|
||||
// CONN.chargingError = CONN_ERR_AC_FAULT;
|
||||
// } else
|
||||
}else if (CONN.EvConnected == 0){
|
||||
CONN.chargingError = CONN_NO_ERROR;
|
||||
}
|
||||
|
||||
if(ED_TraceWarning(CONN.chargingError, 0)) printf("CONN%d Error: %d\n", 0, CONN.chargingError);
|
||||
if(ED_TraceWarning(CONN.chargingError, 0)) {
|
||||
log_printf(LOG_WARN, "CONN0 Error: %d\n", (int)CONN.chargingError);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CONN_Task(){
|
||||
/* CCS state machine is handled in serial.c.
|
||||
* Keep this task lightweight for scheduler compatibility.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
void CONN_SetState(CONN_State_t state){
|
||||
if (connectorState == state) {
|
||||
CONN.connState = state;
|
||||
@@ -79,10 +69,3 @@ void CONN_SetState(CONN_State_t state){
|
||||
|
||||
CONN.connState = state;
|
||||
}
|
||||
|
||||
void CONN_PrintChargingTotal(){
|
||||
printf("CONN%d Charging Finished:\n", 0);
|
||||
// printf("Charging Time: %d\n", CONN.chargingTime);
|
||||
printf("Charging Energy: %d\n", CONN.Energy);
|
||||
// printf("Charging Power: %d\n", CONN.chargingPower);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user