|
@@ -1820,6 +1820,22 @@ int main(void)
|
|
|
previous_gun_info[gun_index].legacyRequest.isLegacyRequest = ShmCharger->gun_info[gun_index].legacyRequest.isLegacyRequest;
|
|
|
}
|
|
|
|
|
|
+ if((previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0] != ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0]) ||
|
|
|
+ (previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][1] != ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][1]) ||
|
|
|
+ (previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][2] != ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][2]))
|
|
|
+ {
|
|
|
+ DEBUG_INFO("**************************************************\n");
|
|
|
+ DEBUG_INFO("********* High priority polling : Case 2-X *******\n");
|
|
|
+ DEBUG_INFO("**************************************************\n");
|
|
|
+ DEBUG_INFO("MCU-%d set relay status [0][0] : %d\n", gun_index, ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0]);
|
|
|
+ DEBUG_INFO("MCU-%d set relay status [0][1] : %d\n", gun_index, ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][1]);
|
|
|
+ DEBUG_INFO("MCU-%d set relay status [0][2] : %d\n", gun_index, ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][2]);
|
|
|
+
|
|
|
+ previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0] = ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][0];
|
|
|
+ previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][1] = ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][1];
|
|
|
+ previous_gun_info[gun_index].primaryMcuState.relayState.relay_status[0][2] = ShmCharger->gun_info[gun_index].primaryMcuState.relayState.relay_status[0][2];
|
|
|
+ }
|
|
|
+
|
|
|
//===============================
|
|
|
// Query primary MCU status
|
|
|
//===============================
|
|
@@ -1889,7 +1905,7 @@ int main(void)
|
|
|
//===============================
|
|
|
// Query present output current
|
|
|
//===============================
|
|
|
- if((int)previous_gun_info[gun_index].outputCurrent.L1N_L12[0] != (int)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0])
|
|
|
+ if((abs((int)ShmCharger->gun_info[gun_index].outputCurrent.L1N_L12[0] - (int)previous_gun_info[gun_index].outputCurrent.L1N_L12[0]) >= 2))
|
|
|
{
|
|
|
DEBUG_INFO("**************************************************\n");
|
|
|
DEBUG_INFO("********* High priority polling : Case 5 *********\n");
|
|
@@ -1943,7 +1959,7 @@ int main(void)
|
|
|
//==========================================================
|
|
|
// Low priority polling log print out
|
|
|
//==========================================================
|
|
|
- if((int)previous_gun_info[gun_index].inputVoltage.L1N_L12 != (int)ShmCharger->gun_info[gun_index].inputVoltage.L1N_L12)
|
|
|
+ if((abs((int)ShmCharger->gun_info[gun_index].inputVoltage.L1N_L12 - (int)previous_gun_info[gun_index].inputVoltage.L1N_L12) >= 2))
|
|
|
{
|
|
|
DEBUG_INFO("==================================================\n");
|
|
|
DEBUG_INFO("======== Normal priority polling : Case 1 ========\n");
|
|
@@ -2128,7 +2144,7 @@ int main(void)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DEBUG_WARN("MCU-%d set relay request fail...%d\n", gun_index, failCount[gun_index]);
|
|
|
+ DEBUG_WARN("MCU-%d set permission request fail...%d\n", gun_index, failCount[gun_index]);
|
|
|
if(failCount[gun_index]<1000)
|
|
|
{
|
|
|
failCount[gun_index]++;
|