This commit is contained in:
@@ -444,7 +444,7 @@ public partial class D7896ViewModel : ObservableObject
|
|||||||
// 测量间隔(即使舍弃也等待,让样品恢复)
|
// 测量间隔(即使舍弃也等待,让样品恢复)
|
||||||
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
if (validCount < requiredCount && !_stopRequested && attemptCount < maxAttempts)
|
||||||
{
|
{
|
||||||
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 1000, _testCts.Token); } catch (OperationCanceledException) { break; }
|
try { await Task.Delay(_config.TestParameters.IntervalSeconds * 200, _testCts.Token); } catch (OperationCanceledException) { break; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
<GroupBox Header="串口设置" Grid.Row="0" Margin="5">
|
||||||
<StackPanel Orientation="Horizontal" Margin="5">
|
<StackPanel Orientation="Horizontal" Margin="5">
|
||||||
<Label Content="端口:"/>
|
<Label Content="端口:"/>
|
||||||
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True"/>
|
<ComboBox x:Name="cmbPort" Width="80" IsEditable="True" Text="COM2"/>
|
||||||
<Label Content="波特率:" Margin="10,0,0,0"/>
|
<Label Content="波特率:" Margin="10,0,0,0"/>
|
||||||
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
<ComboBox x:Name="cmbBaudrate" Width="80" SelectedIndex="1">
|
||||||
<ComboBoxItem>9600</ComboBoxItem>
|
<ComboBoxItem>9600</ComboBoxItem>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace ConstantCurrentControl
|
|||||||
_readTimer = new DispatcherTimer();
|
_readTimer = new DispatcherTimer();
|
||||||
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
_readTimer.Interval = TimeSpan.FromMilliseconds(50);
|
||||||
_readTimer.Tick += ReadTimer_Tick;
|
_readTimer.Tick += ReadTimer_Tick;
|
||||||
|
cmbPort.Text = "COM2";
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 串口连接
|
#region 串口连接
|
||||||
|
|||||||
Reference in New Issue
Block a user