forked from achamaikin/CCSModuleSW30Web
clean project
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
|
||||
#include "charger_control.h"
|
||||
|
||||
#include "charger_config.h"
|
||||
#include "psu_control.h"
|
||||
#include "connector.h"
|
||||
#include "debug.h"
|
||||
#include "psu_control.h"
|
||||
|
||||
ChargingConnector_t CONN;
|
||||
CONN_State_t connectorState;
|
||||
extern uint8_t config_initialized;
|
||||
|
||||
void CONN_Init(){
|
||||
|
||||
@@ -28,24 +26,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;
|
||||
@@ -71,10 +61,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