Эх сурвалжийг харах

reason:
this change is because two relay board are in the power cabinet.
we need to report the output voltage and current to EV(eletric vehicle).
and dispensor use EV board to send message to EV.
So, we need to send the output voltage and current to dispensor.
and dispensor will send message to EV.

change:
We get the output voltage and current from task called "interComm".
The function GetPersentOutputVol to retrieve the output voltage and current.
and store output voltage and current into ShmRelayModuleData[0]->Gun1FuseOutputVolt and ShmRelayModuleData[0]->Gun1RelayOutputVolt.

in the task "Module_EvComm", we send message through ether using tcp.
the one of package, we want to send is called charging info.

the code we are adding that is assign the ShmRelayModuleData[0]->Gun1FuseOutputVolt and ShmRelayModuleData[0]->Gun1RelayOutputVolt to voltage and current.

william 2 жил өмнө
parent
commit
dfe9573d6b

+ 5 - 0
EVSE/Projects/DQC480/Apps/Module_EvComm.c

@@ -1958,6 +1958,11 @@ void WriteChargingInfoResponse(int socket, struct PACKET_STRUCTURE *packet, unsi
         current = (unsigned short)(chargingInfo[gun]->PresentChargingCurrent * 10);
     }
 
+#ifdef DQC480
+    voltage=(unsigned short)(chargingInfo[gun]->FireChargingVoltage);
+    current=(unsigned short)(chargingInfo[gun]->PresentChargingCurrent*10);
+#endif
+
     memset(&sendBuffer, 0x00, sizeof(sendBuffer));
     sendBuffer.Header.se = packet->Header.se;
     sendBuffer.Header.id = packet->Header.id;

+ 2 - 0
EVSE/Projects/DQC480/Apps/Module_EvComm.h

@@ -53,6 +53,8 @@
 
 #define AUTO_GUN_SELECTION_ID           0xFF
 
+//#define DQC480
+
 struct Message
 {
 	int				size;