private void SafetyChecker(object StateObject) { wisetele.safetyMonitorTimer.Enabled = false; string reason = wisetele.SafeAtCoordinates( Angle.FromHours(wisetele.RightAscension, Angle.Type.RA), Angle.FromDegrees(wisetele.Declination, Angle.Type.Dec)); if (reason == string.Empty) { wisetele.safetyMonitorTimer.Enabled = true; return; } #region debug WiseTele.debugger.WriteLine(Debugger.DebugLevel.DebugLogic, "SafetyChecker: activated (action: {0}, reason: {1})", WhenNotSafe.ToString(), reason); #endregion switch (WhenNotSafe) { case ActionWhenNotSafe.None: return; case ActionWhenNotSafe.StopMotors: wisetele.Stop(); break; case ActionWhenNotSafe.Backoff: wisetele.Backoff(); break; } wisetele.safetyMonitorTimer.Enabled = true; }