Browse Source

称bug

master
yibo 5 years ago
parent
commit
a35c38e61e
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      ButcherFactory.Form/Controls/WeightControl.cs

+ 5
- 4
ButcherFactory.Form/Controls/WeightControl.cs View File

@ -182,11 +182,12 @@ namespace ButcherFactory.Controls
if (availableCount == 0)
{
Thread.Sleep(10);
}
char[] buffer = new char[availableCount];
}
byte[] buffer = new byte[availableCount];
weightPort.Read(buffer, 0, availableCount);
foreach (var c in buffer)
{
foreach (var b in buffer)
{
var c = (char)b;
if (c == _dataFormat.Beginchar)
{
_dataStrBuilder.Clear();


Loading…
Cancel
Save