|
@@ -17,7 +17,7 @@ namespace ShakerManger.ViewModel
|
|
|
|
|
|
private bool isSupport = false;
|
|
private bool isSupport = false;
|
|
private CancellationTokenSource source = new CancellationTokenSource();
|
|
private CancellationTokenSource source = new CancellationTokenSource();
|
|
- private bool level = true;
|
|
|
|
|
|
+ private bool level = false;
|
|
private bool isEnabled = true;
|
|
private bool isEnabled = true;
|
|
|
|
|
|
public GPIOControlViewModel()
|
|
public GPIOControlViewModel()
|
|
@@ -76,11 +76,11 @@ namespace ShakerManger.ViewModel
|
|
public void Stop()
|
|
public void Stop()
|
|
{
|
|
{
|
|
source?.Cancel();
|
|
source?.Cancel();
|
|
- Level = true;
|
|
|
|
|
|
+ Level = false;
|
|
}
|
|
}
|
|
public void Close()
|
|
public void Close()
|
|
{
|
|
{
|
|
- Level = true;
|
|
|
|
|
|
+ Level = false;
|
|
source.Cancel();
|
|
source.Cancel();
|
|
Susi4.SusiGPIOControl.Default.Close();
|
|
Susi4.SusiGPIOControl.Default.Close();
|
|
}
|
|
}
|
|
@@ -91,7 +91,7 @@ namespace ShakerManger.ViewModel
|
|
{
|
|
{
|
|
if (level == value) return;
|
|
if (level == value) return;
|
|
UpdateProperty(ref level, value);
|
|
UpdateProperty(ref level, value);
|
|
- if (value) return;
|
|
|
|
|
|
+ if (!value) return;
|
|
foreach(var val in MainWindowViewModel.Default.Shakers.Shakers)
|
|
foreach(var val in MainWindowViewModel.Default.Shakers.Shakers)
|
|
{
|
|
{
|
|
if (!val.IsConnected) continue;
|
|
if (!val.IsConnected) continue;
|