|
|
@@ -41,7 +41,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
DataTable Dbfind;
|
|
|
|
|
|
- Regex re = new Regex("\\d+.\\w+");
|
|
|
+ Regex re = new Regex("\\d+.\\d+");
|
|
|
|
|
|
string ErrorMessage;
|
|
|
|
|
|
@@ -262,11 +262,11 @@ namespace UAS_MES_NEW.Make
|
|
|
Byte[] readBuffer = new Byte[len];
|
|
|
serialPort1.Read(readBuffer, 0, len); //将数据读入缓存
|
|
|
string weigh = Encoding.Default.GetString(readBuffer);
|
|
|
- Remark.AppendText(weigh + "\n");
|
|
|
if (weigh != "")
|
|
|
{
|
|
|
weight.Text = re.Match(weigh).Value;
|
|
|
}
|
|
|
+ Remark.AppendText(weight.Text+"\n");
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|