iPerlCommunication.OpticalHeadTest rectified.

This commit is contained in:
Milan Hanajik 2023-09-25 08:53:36 +02:00
parent 78772df3a0
commit 30627abc6a

View File

@ -55,7 +55,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
string payload = "03"; string payload = "03";
RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 }; RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 };
rfidCommunicationService.RfidWrite(Params.u8_WakeUpInterval, payload); rfidCommunicationService.RfidWrite(Params.u8_WakeUpInterval, payload);
return rfidCommunicationService.RfidRead(Params.u8_WakeUpInterval).ToString() == payload? "OK" : "Error"; return rfidCommunicationService.RfidRead<string>(Params.u8_WakeUpInterval).ToString() == payload ? "OK" : "Error";
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -71,7 +71,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 }; RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 };
rfidCommunicationService.RfidWrite(SystemInfo.u8_system_state, payload); rfidCommunicationService.RfidWrite(SystemInfo.u8_system_state, payload);
Thread.Sleep(1000); // must be for pass thru params Thread.Sleep(1000); // must be for pass thru params
return rfidCommunicationService.RfidRead(SystemInfo.u8_system_state).ToString() == payload ? "OK" : "Error"; return rfidCommunicationService.RfidRead<string>(SystemInfo.u8_system_state).ToString() == payload ? "OK" : "Error";
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -89,7 +89,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
{ {
RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 }; RfidCommunicationService rfidCommunicationService = new RfidCommunicationService { ComPort = $"COM{iHead.RfidComPortNr}", WaitTimeAfterFailure = 2200, PassThroughWaitTime = 1500, MaxRetries = 3, TimeOut = 5000 };
//rfidCommunicationService.RfidWrite(Params.u8_Customer_Text, custText); //rfidCommunicationService.RfidWrite(Params.u8_Customer_Text, custText);
return rfidCommunicationService.RfidRead(Params.u8_Customer_Text).ToString(); return rfidCommunicationService.RfidRead<string>(Params.u8_Customer_Text).ToString();
} }
} }
catch (Exception ex) catch (Exception ex)