Ejemplo n.º 1
0
        /// <summary>
        /// Delete the current sensor from the robot
        /// </summary>
        public void DeleteSensor()
        {
            //Don't change the order of following lines or it won't work
            string type = currentSensor.sensorType;

            Destroy(currentSensor.gameObject);
            sensorManager.RemoveSensor(currentSensor.gameObject, type);
            ShiftOutputPanels();
            currentSensor = null;

            EndProcesses();
            tabStateMachine.FindState <SensorToolbarState>().RemoveSensorFromDropdown(type,
                                                                                      sensorManager.ultrasonicList, sensorManager.beamBreakerList, sensorManager.gyroList);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Delete the current sensor from the robot
        /// </summary>
        public void DeleteSensor()
        {
            //Don't change the order of following lines or it won't work
            string type = currentSensor.sensorType;

            Destroy(currentSensor.gameObject);
            sensorManager.RemoveSensor(currentSensor.gameObject, type);
            ShiftOutputPanels();
            currentSensor = null;

            AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.SensorTab,
                                                          AnalyticsLedger.EventAction.Removed,
                                                          "Sensors",
                                                          AnalyticsLedger.getMilliseconds().ToString());

            EndProcesses();
            tabStateMachine.FindState <SensorToolbarState>().RemoveSensorFromDropdown(type,
                                                                                      sensorManager.ultrasonicList, sensorManager.beamBreakerList, sensorManager.gyroList);
        }