diff --git a/ccs/hardwareInterface.cpp b/ccs/hardwareInterface.cpp index 46b196b..0943a12 100644 --- a/ccs/hardwareInterface.cpp +++ b/ccs/hardwareInterface.cpp @@ -543,10 +543,12 @@ void hardwareInterface_WakeupOtherPeripherals() } } -/* send the measured CP duty cycle to the serial console for debugging. */ -void hardwareInterface_LogTheCpDuty(void) { - int16_t cpDuty_Percent = (uint8_t)Param::GetInt(Param::ControlPilotDuty); - addToTrace(MOD_HWIF, "cpDuty [%] ", cpDuty_Percent); +/* send the measured CP duty cycle and PP resistance etc to the serial console for debugging. */ +void hardwareInterface_LogTheCpPpPhysicalData(void) { + addToTrace(MOD_HWIF, "cpDuty [%] ", (int16_t)Param::GetInt(Param::ControlPilotDuty)); + addToTrace(MOD_HWIF, "AdcProximityPilot ", (int16_t)Param::GetInt(Param::AdcProximityPilot)); + addToTrace(MOD_HWIF, "ResistanceProxPilot [ohm] ", (int16_t)Param::GetInt(Param::ResistanceProxPilot)); + addToTrace(MOD_HWIF, "HardwareVariant ", (int16_t)Param::GetInt(Param::HardwareVariant)); } void hardwareInterface_cyclic(void) diff --git a/ccs/hardwareInterface.h b/ccs/hardwareInterface.h index d83e7a0..68a90c5 100644 --- a/ccs/hardwareInterface.h +++ b/ccs/hardwareInterface.h @@ -35,7 +35,7 @@ extern int16_t hardwareInterface_getInletVoltage(void); extern int16_t hardwareInterface_getChargingTargetVoltage(void); extern int16_t hardwareInterface_getChargingTargetCurrent(void); extern void hardwareInterface_WakeupOtherPeripherals(); -extern void hardwareInterface_LogTheCpDuty(); +extern void hardwareInterface_LogTheCpPpPhysicalData(); extern void hardwareInterface_cyclic(void); extern void hardwareInterface_init(void); diff --git a/ccs/homeplug.cpp b/ccs/homeplug.cpp index a65888a..3509060 100644 --- a/ccs/homeplug.cpp +++ b/ccs/homeplug.cpp @@ -582,7 +582,7 @@ void runSlacSequencer(void) { publishStatus("Starting SLAC", ""); addToTrace(MOD_HOMEPLUG, "[PEVSLAC] Checkpoint100: Sending SLAC_PARAM.REQ..."); - hardwareInterface_LogTheCpDuty(); + hardwareInterface_LogTheCpPpPhysicalData(); setCheckpoint(100); composeSlacParamReq(); myEthTransmit(); @@ -732,7 +732,7 @@ void runSlacSequencer(void) { // It was sufficient time to get the answers from the modems. addToTrace(MOD_HOMEPLUG, "[PEVSLAC] It was sufficient time to get the answers from the modems."); - hardwareInterface_LogTheCpDuty(); + hardwareInterface_LogTheCpPpPhysicalData(); // Let's see what we received. if (!isEvseModemFound()) { diff --git a/ccs/pevStateMachine.cpp b/ccs/pevStateMachine.cpp index 80550a7..5bd3100 100644 --- a/ccs/pevStateMachine.cpp +++ b/ccs/pevStateMachine.cpp @@ -240,6 +240,7 @@ static void pev_sendCableCheckReq(void) that we enter the safe shutdown sequence as intended. (This is a takeover from https://github.com/uhi22/pyPLC/commit/08af8306c60d57c4c33221a0dbb25919371197f9 ) */ connMgr_ApplOk(31); + hardwareInterface_LogTheCpPpPhysicalData(); /* for trouble shooting, log some physical values to the console */ } static void pev_sendPreChargeReq(void)