Commit fd0adbb3 LN

高度修改

1 个父辈 7f90f9b6
...@@ -111,7 +111,7 @@ namespace OnlineStore.Common ...@@ -111,7 +111,7 @@ namespace OnlineStore.Common
} }
catch (Exception e) catch (Exception e)
{ {
LogUtil.error(LOGGER, "POST ERROR:" + e.StackTrace, 1); LogUtil.error(LOGGER, "POST ERROR:" + e.ToString(), 1);
} }
if (!result.Contains("null") && result.Length != 0) if (!result.Contains("null") && result.Length != 0)
{ {
......
...@@ -133,13 +133,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,13 +133,13 @@ namespace OnlineStore.DeviceLibrary
} }
public override double GetAIValue(string ioiP,int index) public override double GetAIValue(string ioiP, int index)
{ {
if (AIValList != null && AIValList.Count > index) if (AIValList != null && index >= 0 && AIValList.Count > index)
{ {
return AIValList[index]; return AIValList[index];
} }
return -1; return 0;
} }
......
...@@ -1495,16 +1495,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -1495,16 +1495,27 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public int GetHeight() public int GetHeight()
{ {
int value = Get13Height(); if (Config.Default_TrayWidth.Equals(7))
if (value > 0) {
return Get7Height();
}
else if (Config.Default_TrayWidth.Equals(13))
{ {
return value; return Get13Height();
} }
else else
{ {
return Get7Height(); int value = Get13Height();
} if (value > 0)
{
return value;
}
else
{
return Get7Height();
}
}
} }
private int Get7Height() private int Get7Height()
{ {
...@@ -1527,7 +1538,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1527,7 +1538,7 @@ namespace OnlineStore.DeviceLibrary
private int Get13Height() private int Get13Height()
{ {
if (Config.AIDI3_Addr < 0) if (Config.AIDI3_Addr < 0||Config.AIDI4_Addr<0)
{ {
return 0; return 0;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!