add camera driver layer

This commit is contained in:
2025-12-26 14:54:32 +08:00
parent c6be81d1dd
commit d7ef283b9d
11 changed files with 324 additions and 469 deletions

View File

@@ -43,14 +43,19 @@ namespace LibComm
cc24.NotifyCamAcqDisabled -= CC24_NotifyCamAcqDisabled;
cc24.Shutdown();
}
public void NoticeCamComplete(int index, byte[] datax)
public void NoticeCamComplete(int index, float data)
{
cc24?.NotifyCamInspectionComplete(index, datax);
cc24?.NotifyCamInspectionComplete(index, DataConverter.FloatToByte(data, true));
cc24?.NotifyCamAcqComplete(index);
}
public void NoticeCamComplete(int index, List<float> data)
{
cc24?.NotifyCamInspectionComplete(index, DataConverter.FloatToByte(data, true));
cc24?.NotifyCamAcqComplete(index);
}
private void CC24_NewUserDataReceived(object sender, CogNdmNewUserDataEventArgs e)
{
OnDataReceived?.Invoke(cc24.ReadBytesFromPLC(0, 4));
OnDataReceived?.Invoke(DataConverter.ByteToFloat(cc24.ReadBytesFromPLC(0, 4), true));
}
private void CC24_PlcConnectionStatusChanged(object sender, CogNdmProtocolStatusChangedEventArgs e)
{