Commit 74725c52 authored by frank's avatar frank 🏀

完整地修改了会显示25000的问题

修改了会在单窗口显示的时间轴错乱的bug
parent 2f538301
......@@ -42,7 +42,7 @@ namespace GcDevicePc
this.fid1ver.Text = this.FID1version;
this.fid2ver.Text = this.FID2version;
this.tcdver.Text = this.TCD1version;
this.PCver.Text = this.Hmiversion + "/1.7.5";
this.PCver.Text = this.Hmiversion + "/1.7.6";
}
}
}
......@@ -318,7 +318,7 @@ namespace GcDevicePc.Common
private bool bFirstMaxTim1 = true;
public void Get_Channel_Data()
{
UInt16[] dest = new UInt16[channel_num];
UInt16[] dest = new UInt16[channel_num*2];
UInt32[] timev = new UInt32[30];
float[] fidv = new float[30];
......
......@@ -842,7 +842,7 @@ namespace GcDevicePc
/// 1.0.2.3 添加了周期完成后,重新绘图功能
private void timer1_Tick(object sender, EventArgs e)
{
this.Text = String.Format("{0}-1.7.5{1}", globaldata.AppName,Formstr);
this.Text = String.Format("{0}-1.7.6{1}", globaldata.AppName,Formstr);
HmiStatus.Text = bEnglishLanguage == false ? String.Format("状态:{0}", statestr) : String.Format("State:{0}", statestr);
......
......@@ -95,8 +95,16 @@ namespace GcDevicePc.ProThread
{
while (!channeldata_mre.WaitOne(500))
{
try
{
ReadChannelData();
}
catch (Exception ex)
{
Log.Info("ReadChannelData线程 重启");
}
}
}
private void ReadChannelData()
......
......@@ -248,14 +248,30 @@ namespace GcDevicePc.ProThread
#endif
//j++;
//Get_Channel1_ValueNum++;
lock (globaldata.m_signalbuffer.Draw_Port)
{
if (globaldata.m_signalbuffer.Draw_Port.Count < globaldata.MAX_ARRAY_LEN)
{
globaldata.m_signalbuffer.Draw_Port.Add(globaldata.m_signalbuffer.Channel1_Port);
}
if(globaldata.m_signalbuffer.Save_Port.Count < globaldata.MAX_ARRAY_LEN)
{
else
{
globaldata.m_signalbuffer.Draw_Port.Clear();
}
}
lock (globaldata.m_signalbuffer.Save_Port)
{
if (globaldata.m_signalbuffer.Save_Port.Count < globaldata.MAX_ARRAY_LEN)
{
globaldata.m_signalbuffer.Save_Port.Add(globaldata.m_signalbuffer.Channel1_Port);
}
else
{
globaldata.m_signalbuffer.Save_Port.Clear();
}
}
if (globaldata.m_pcbuffer.gcpcinfo.pcworkinfo.sendtohw)
{
......@@ -292,7 +308,13 @@ namespace GcDevicePc.ProThread
}
}
}
else
{
if (Math.Abs(tmp - fDetMax_Time) < 0x00FFFFFF)
{
bFirstMaxTim1 = true;
}
}
}
}
}
......
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