private bool SetupActuator() { try { _horizontalActuator = new LinearActuator(); TrackerState = State.InitializingActuator; _horizontalActuator.Initialize(); _horizontalActuator.RetractedPosition = Configuration.EastAzimuth; _horizontalActuator.ExtendedPosition = Configuration.WestAzimuth; if (Configuration.DualAxis) { _verticalActuator = new LinearActuator(true); _verticalActuator.Initialize(); _verticalActuator.RetractedPosition = 90 - Configuration.MaximumElevation; _verticalActuator.ExtendedPosition = 90 - Configuration.MinimumElevation; } } catch (Exception) { DebugLogger.TryLog(Resources.GetString(Resources.StringResources.ActuatorError)); _horizontalActuator = null; } return(_horizontalActuator != null); }
private bool SetupActuator() { try { _horizontalActuator = new LinearActuator(); TrackerState = State.InitializingActuator; _horizontalActuator.Initialize(); _horizontalActuator.RetractedPosition = Configuration.EastAzimuth; _horizontalActuator.ExtendedPosition = Configuration.WestAzimuth; if (Configuration.DualAxis) { _verticalActuator = new LinearActuator(true); _verticalActuator.Initialize(); _verticalActuator.RetractedPosition = 90 - Configuration.MaximumElevation; _verticalActuator.ExtendedPosition = 90 - Configuration.MinimumElevation; } } catch (Exception) { DebugLogger.TryLog(Resources.GetString(Resources.StringResources.ActuatorError)); _horizontalActuator = null; } return _horizontalActuator != null; }