|
@@ -67,6 +67,7 @@ int rfidFd = -1;
|
|
|
char* rfidPortName = "/dev/ttyS2";
|
|
|
RFID rfid;
|
|
|
char *valid_Internet[2] = {"8.8.8.8", "180.76.76.76"};
|
|
|
+int isRfidReadable;
|
|
|
|
|
|
//==========================
|
|
|
// Declare share memory
|
|
@@ -4222,7 +4223,15 @@ int main(void)
|
|
|
{
|
|
|
if(GetCardSerialNumber()!= FAIL)
|
|
|
{
|
|
|
- ShmCharger->gun_info[ShmCharger->gun_selectd].rfidReq = ON;
|
|
|
+ if(isRfidReadable)
|
|
|
+ {
|
|
|
+ ShmCharger->gun_info[ShmCharger->gun_selectd].rfidReq = ON;
|
|
|
+ isRfidReadable = NO;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ isRfidReadable = YES;
|
|
|
}
|
|
|
}
|
|
|
|