Commit 745fbdc6 authored by wangjunqiang's avatar wangjunqiang

div 0 bug

parent 60af091a
...@@ -144,8 +144,17 @@ namespace GcDevicePc.Common ...@@ -144,8 +144,17 @@ namespace GcDevicePc.Common
{ {
if ((ushort) SharedSpace.Data.typesint == 1 || (ushort) SharedSpace.Data.typesint == 2) if ((ushort) SharedSpace.Data.typesint == 1 || (ushort) SharedSpace.Data.typesint == 2)
{ {
value = (ushort)((globaldata.m_hmibuffer.gcinfo.batruncount *1.0f)/ if (SharedSpace.MControl.dateend != 0 && SharedSpace.MControl.zhouqi != 0)
(ushort)(SharedSpace.MControl.dateend/SharedSpace.MControl.zhouqi)*1000); {
value = (ushort) ((globaldata.m_hmibuffer.gcinfo.batruncount * 1.0f) /
(ushort) (SharedSpace.MControl.dateend * 1.0f /
SharedSpace.MControl.zhouqi) * 1000);
}
else
{
value = 0;
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment