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