public async Task ActivatePresetsForever(CancellationToken token) { while (!token.IsCancellationRequested) { try { var preset = repo.GetPresetToActivate(); if (preset != null) { lc.Activate(preset); } } catch (Exception e) { } await Task.Delay(10000); } stopDetector.Set(); }
public ActionResult Activate(string name) { ledController.Activate(name); return(RedirectToAction("Index")); }