private void LaunchCameraSelectButton_Click(object sender, EventArgs e) { if (CameraSelectModes.launchCamera == this.cameraSelectMode) { this.cameraSelectMode = CameraSelectModes.none; } else { this.cameraSelectMode = CameraSelectModes.launchCamera; } this.UpdateCameraHoldEnable(); this.UpdateCameraSelectorColor(); }
private void RobotCameraBSelectButton_Click(object sender, EventArgs e) { if (CameraSelectModes.robotCameraB == this.cameraSelectMode) { this.cameraSelectMode = CameraSelectModes.none; } else { this.cameraSelectMode = CameraSelectModes.robotCameraB; } this.UpdateCameraHoldEnable(); this.UpdateCameraSelectorColor(); }
private void ProcessStarting() { string versionString = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); this.VersionLabel.Text = versionString; ParameterAccessor.Instance.Read(Application.ExecutablePath); this.traceListener.SetDestination(ParameterAccessor.Instance.Trace.Address, ParameterAccessor.Instance.Trace.Port); Tracer.WriteHigh(TraceGroup.GUI, null, "starting"); if (RobotApplications.repair == ParameterAccessor.Instance.RobotApplication) { this.TitleLabel.Text = " CIRRIS XR"; this.FrontSealantReserviorPanel.Visible = true; this.RearSealantReserviorPanel.Visible = true; this.DrillMainPanel.Visible = true; this.InspectionPanel.Top = this.DrillMainPanel.Top; this.InspectionPanel.Left = this.DrillMainPanel.Left; this.InspectionPanel.Visible = false; ParameterAccessor.Instance.FrontDrill.ExtendedDistance.OperationalValue = 0; ParameterAccessor.Instance.FrontDrill.RotationSpeed.OperationalValue = 0; ParameterAccessor.Instance.RearDrill.ExtendedDistance.OperationalValue = 0; ParameterAccessor.Instance.RearDrill.RotationSpeed.OperationalValue = 0; this.RobotCamera6Button.Visible = true; this.RobotCamera11Button.Visible = true; this.RobotCamera2Button.Text = "RFF DRILL"; this.RobotCamera6Button.Text = "FFF DRILL"; this.RobotCamera10Button.Text = "LOWER FORWARD"; this.RobotCamera9Button.Text = "RRF DRILL"; this.RobotCamera11Button.Text = "FRF DRILL"; this.RobotCamera12Button.Text = "LOWER BACK"; this.RobotCamera2Button.Camera = CameraLocations.robotRffDrill; this.RobotCamera6Button.Camera = CameraLocations.robotFffDrill; this.RobotCamera10Button.Camera = CameraLocations.robotLowerForward; this.RobotCamera9Button.Camera = CameraLocations.robotRrfDrill; this.RobotCamera11Button.Camera = CameraLocations.robotFrfDrill; this.RobotCamera12Button.Camera = CameraLocations.robotLowerBack; } if (RobotApplications.inspect == ParameterAccessor.Instance.RobotApplication) { this.TitleLabel.Text = " CIRRIS XI"; this.FrontSealantReserviorPanel.Visible = false; this.RearSealantReserviorPanel.Visible = false; this.DrillMainPanel.Visible = false; this.DrillManualPanel.Visible = false; this.SealantMainPanel.Visible = false; this.SealantManualPanel.Visible = false; this.BodyDrillButton.Text = ""; this.BodyDrillButton.Enabled = false; this.InspectionPanel.Top = this.DrillMainPanel.Top; this.InspectionPanel.Left = this.DrillMainPanel.Left; this.InspectionPanel.Visible = true; this.RobotCamera6Button.Visible = false; this.RobotCamera11Button.Visible = false; this.RobotCamera2Button.Text = "LOWER BACK"; this.RobotCamera10Button.Text = "LOWER FORWARD"; this.RobotCamera9Button.Text = "SENSOR ARM"; this.RobotCamera12Button.Text = "SENSOR BAY"; this.RobotCamera2Button.Camera = CameraLocations.robotLowerBack; this.RobotCamera10Button.Camera = CameraLocations.robotLowerForward; this.RobotCamera9Button.Camera = CameraLocations.robotSensorArm; this.RobotCamera12Button.Camera = CameraLocations.robotSensorBay; } this.indicatorFlasher = false; this.feederFastSelected = true; this.feederPreviousRequest = 0; this.feederNonManualMode = FeederModes.off; this.FeederSpeedToggleButton.OptionASelected = this.feederFastSelected; this.FeederManualPanel.Visible = false; this.FeederManulDisplayButton.Text = "SHOW MANUAL"; this.FeederSpeedToggleButton.Visible = true; this.FeederSpeedValueButton.ValueText = this.GetValueText(ParameterAccessor.Instance.FeederManualSpeed); this.UpdateFeederControls(); this.ReelCalibrateToButton.ValueText = this.GetValueText(ParameterAccessor.Instance.ReelCalibrationDistance); this.ReelManualCalibrateToButton.ValueText = this.GetValueText(ParameterAccessor.Instance.ReelCalibrationDistance); this.ReelCalibrateToButton.Enabled = false; this.ReelShowManualButton.Enabled = true; this.ReelManualDirectionToggleButton.OptionASelected = true; this.ReelManualDirectionToggleButton.Enabled = true; this.ReelSetupButton.Enabled = true; this.ReelManualSetupButton.Enabled = true; this.ReelManualHideButton.Enabled = true; this.UpdateReelControls(); this.ReelManualPanel.Visible = false; if (MovementForwardControls.current == ParameterAccessor.Instance.ReelMotionMode) { this.ReelManualValueTextPanel.ValueText = this.GetValueText(ParameterAccessor.Instance.ReelManualCurrent); this.ReelManualDirectionToggleButton.Text = "TORQUE DIRECTION"; this.ReelValuePromptLabel.Text = "SET CURRENT"; } else { this.ReelManualValueTextPanel.ValueText = this.GetValueText(ParameterAccessor.Instance.ReelManualSpeed); this.ReelManualDirectionToggleButton.Text = "SPEED DIRECTION"; this.ReelValuePromptLabel.Text = "SET SPEED"; } this.movementFastSelected = true; this.movementNonManualMode = MovementModes.off; this.movementNonManualForwardMode = MovementForwardModes.normalAxial; this.MotorManualJogDistanceValueButton.ValueText = this.GetValueText(ParameterAccessor.Instance.MovementMotorManualJogDistance); this.MotorManualMoveSpeedValueButton.ValueText = this.GetValueText(ParameterAccessor.Instance.MovementMotorManualMoveSpeed); this.MovementSpeedToggleButton.OptionASelected = this.movementFastSelected; this.MovementManulPanel.Visible = false; this.MovementManaulDisplayButton.Text = "SHOW MANUAL"; this.MovementSpeedToggleButton.Visible = true; this.UpdateMovementControls(); #region Drill/Sealant Controls if (RobotApplications.repair == ParameterAccessor.Instance.RobotApplication) { this.toolLocation = (false != ParameterAccessor.Instance.FrontToolSelected) ? ToolLocations.front : ToolLocations.rear; this.SetDrillSelection(this.toolLocation); this.DrillManulDisplayButton.Text = "SHOW MANUAL"; this.DrillMainPanel.Visible = true; this.DrillManualPanel.Visible = false; this.drillManualVisible = false; this.drillManualActivated = false; NicBotComm.Instance.SetPumpSpeed(this.toolLocation, 0); this.SealantManulDisplayButton.Text = "SHOW MANUAL"; this.SealantMainPanel.Visible = false; this.SealantManualPanel.Visible = false; this.pumpManualVisible = false; this.pumpManualActivated = false; this.SealantManualModeToggleButton.OptionASelected = false; this.DrillMainPanel.Focus(); } #endregion #region Sensor Controls if (RobotApplications.inspect == ParameterAccessor.Instance.RobotApplication) { this.sensorThicknessPending = false; this.newThicknessReading = false; this.sensorStressPending = false; this.newStressReading = false; this.sensorDirection = Directions.north; double latitude = ParameterAccessor.Instance.Latitude; if (double.IsNaN(latitude) == false) { this.SensorLatitudeTextPanel.ValueText = latitude.ToString("N4"); } else { this.SensorLatitudeTextPanel.ValueText = "---"; } double longitude = ParameterAccessor.Instance.Longitude; if (double.IsNaN(longitude) == false) { this.SensorLongitudeTextPanel.ValueText = longitude.ToString("N4"); } else { this.SensorLongitudeTextPanel.ValueText = "---"; } this.SensorDirectionTextPanel.ValueText = this.sensorDirection.ToString().ToUpper(); this.SensorDirectionTextPanel.BackColor = Color.FromArgb(51, 51, 51); this.SensorDirectionTextPanel.Enabled = true; this.SensorDisplacementTextPanel.ValueText = "---"; this.SensorGpsDateTextPanel.ValueText = "---"; this.SensorGpsTimeTextPanel.ValueText = "---"; this.SensorThicknessAcquireButton.Enabled = true; this.SensorThicknessReadingTextPanel.ValueText = ""; this.SensorStressAcquireButton.Enabled = true; this.SensorStressReadingTextPanel.ValueText = ""; if (0 != ParameterAccessor.Instance.LocationServer.Port) { LocationServer.Instance.Start(ParameterAccessor.Instance.LocationServer.Address, ParameterAccessor.Instance.LocationServer.Port); } } #endregion #region Camera Controls this.RobotCamera1Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera1Button.Camera); this.RobotCamera2Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera2Button.Camera); this.RobotCamera3Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera3Button.Camera); this.RobotCamera4Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera4Button.Camera); this.RobotCamera5Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera5Button.Camera); this.RobotCamera6Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera6Button.Camera); this.RobotCamera7Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera7Button.Camera); this.RobotCamera8Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera8Button.Camera); this.RobotCamera9Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera9Button.Camera); this.RobotCamera10Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera10Button.Camera); this.RobotCamera11Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera11Button.Camera); this.RobotCamera12Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.RobotCamera12Button.Camera); this.LaunchCamera1Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.LaunchCamera1Button.Camera); this.LaunchCamera2Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.LaunchCamera2Button.Camera); this.LaunchCamera3Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.LaunchCamera3Button.Camera); this.LaunchCamera4Button.CenterLevel = (int)ParameterAccessor.Instance.GetLightLevel(this.LaunchCamera4Button.Camera); this.ClearCameraSelects(this.RobotCamera1Button); this.ClearCameraSelects(this.RobotCamera2Button); this.ClearCameraSelects(this.RobotCamera3Button); this.ClearCameraSelects(this.RobotCamera4Button); this.ClearCameraSelects(this.RobotCamera5Button); this.ClearCameraSelects(this.RobotCamera6Button); this.ClearCameraSelects(this.RobotCamera7Button); this.ClearCameraSelects(this.RobotCamera8Button); this.ClearCameraSelects(this.RobotCamera9Button); this.ClearCameraSelects(this.RobotCamera10Button); this.ClearCameraSelects(this.RobotCamera11Button); this.ClearCameraSelects(this.RobotCamera12Button); this.ClearCameraSelects(this.LaunchCamera1Button); this.ClearCameraSelects(this.LaunchCamera2Button); this.ClearCameraSelects(this.LaunchCamera3Button); this.ClearCameraSelects(this.LaunchCamera4Button); this.cameraSelectMode = CameraSelectModes.none; this.UpdateCameraHoldEnable(); this.UpdateCameraSelectorColor(); this.selectedLaunchCameraButton = null; this.selectedRobotCameraAButton = null; this.selectedRobotCameraBButton = null; this.UpdateCameraHoldEnable(); #endregion NicBotComm.Instance.Start(); ParameterAccessor.Instance.FrontDrill.ExtendedDistance.OperationalValue = ParameterAccessor.Instance.FrontDrill.ExtendedDistance.MinimumValue; // todo remove ParameterAccessor.Instance.FrontDrill.RotationSpeed.OperationalValue = ParameterAccessor.Instance.FrontDrill.RotationSpeed.MinimumValue; // todo remove ParameterAccessor.Instance.RearDrill.ExtendedDistance.OperationalValue = ParameterAccessor.Instance.RearDrill.ExtendedDistance.MinimumValue; // todo remove ParameterAccessor.Instance.RearDrill.RotationSpeed.OperationalValue = ParameterAccessor.Instance.RearDrill.RotationSpeed.MinimumValue; // todo remove this.SystemStatusTextBox.Text = "starting"; this.SystemStatusTextBox.BackColor = Color.Yellow; this.UpdateTimer.Interval = 100; this.Process = this.ProcessWaitComm; }