Commit f51fe40e LN

rfid代码更新

1 个父辈 a07426ab
...@@ -82,7 +82,6 @@ ...@@ -82,7 +82,6 @@
<Compile Include="bean\StoreStep.cs"> <Compile Include="bean\StoreStep.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="RFID\RFID.cs" />
<Compile Include="RFID\RFIDManager.cs" /> <Compile Include="RFID\RFIDManager.cs" />
<Compile Include="RFID\RFIDReader.cs" /> <Compile Include="RFID\RFIDReader.cs" />
</ItemGroup> </ItemGroup>
......
...@@ -17,28 +17,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,28 +17,22 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
RFIDReader.Open(null, iparray); RFIDReader.Open( iparray);
}catch(Exception ex) }catch(Exception ex)
{ {
LogUtil.error("Open 出错:" + ex.ToString()); LogUtil.error("Open 出错:" + ex.ToString());
} }
} }
public static RFIDData ReadRFID(string ip, bool isClear = false) public static RFIDData ReadRFID(string ip, bool isClear = false)
{ {
try try
{ {
if (String.IsNullOrEmpty(ip).Equals(false)) if (String.IsNullOrEmpty(ip).Equals(false))
{ {
byte[] bdata = null; byte[] bdata = null;
if (isClear) bdata = RFIDReader.Read(ip, isClear);
{
bdata = RFIDReader.ReadAndClear(ip);
}
else
{
bdata = RFIDReader.Read(ip);
}
if (bdata == null) if (bdata == null)
{ {
LogUtil.error("RFID [ " + ip + " ] 读到数据=null"); LogUtil.error("RFID [ " + ip + " ] 读到数据=null");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!