Пример #1
0
 private void StopSensorsReading()
 {
     if (SensorsWorker != null)
     {
         Log.Trace("WorkersManager:StopSensorsReading");
         SensorsWorker.StatusChanged -= Worker_StatusChanged;
         SensorsWorker.Stop();
     }
 }
Пример #2
0
 private async Task StartSensorsReading()
 {
     if (SensorsWorker == null)
     {
         Log.Trace("WorkersManager:StartSensorsReading");
         SensorsWorker = new SensorsWorker(Config.SensorsPeriod);
         SensorsWorker.StatusChanged += Worker_StatusChanged;
         await SensorsWorker.Start();
     }
 }