LaneIn - Add DoorId field.
This commit is contained in:
parent
4ca1cc1bd6
commit
3f22ddceb1
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AIParkingApplication
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace AIParkingApplication
|
|||
private Camera overviewCamera;
|
||||
private Camera plateCamera;
|
||||
private PlateProcessor plateProcessor;
|
||||
private int doorId;
|
||||
private bool isSupportSquarePlate;
|
||||
private bool isSupportLongPlate;
|
||||
private bool isAutoOpenDoor;
|
||||
|
@ -19,7 +20,8 @@ namespace AIParkingApplication
|
|||
private bool isRetryModeUntilOk; //TODO: Test mode
|
||||
private C3DeviceController c3Device;
|
||||
|
||||
public LaneIn(string plateStream,
|
||||
public LaneIn(int doorId,
|
||||
string plateStream,
|
||||
string overviewStream,
|
||||
C3DeviceController c3Device,
|
||||
bool isSupportSquarePlate = true,
|
||||
|
@ -29,6 +31,7 @@ namespace AIParkingApplication
|
|||
bool isRetryModeUntilOk = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.doorId = doorId;
|
||||
this.isSupportSquarePlate = isSupportSquarePlate;
|
||||
this.isSupportLongPlate = isSupportLongPlate;
|
||||
this.isAutoOpenDoor = isAutoOpenDoor;
|
||||
|
@ -57,10 +60,15 @@ namespace AIParkingApplication
|
|||
|
||||
private void C3Device_OnNewCardReceived(int doorId, string cardNumber)
|
||||
{
|
||||
//Request To Capture And Process Frame.
|
||||
CaptureAllCamera();
|
||||
//Request Card Info
|
||||
if (isAutoOpenDoor)
|
||||
{
|
||||
c3Device.OpenDoor(doorId);
|
||||
if (this.doorId == doorId)
|
||||
{
|
||||
c3Device.OpenDoor(doorId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user