Example #1
0
        private void HandleStartRecordingCommand()
        {
            if (_recorder.IsRecording)
            {
                Log.Debug("Ignoring start recording command since recorder already running");
                return;
            }

            if (!Settings.CalibrationDone)
            {
                Log.Debug("Ignoring start recording command since device is not calibrated");
                return;
            }

            Log.Debug("Executing start recording command");

            _sensors.StartSensing();
            _recorder.Start();

            //Ensure GPS information is refreshed before signaling recording
            OnPropertyChanged(() => LocationSensorStatus);
            SensorStatusUpdated.Raise(this);

            OnPropertyChanged(() => IsRecording);
            RecordingStatusUpdated.Raise(this);

            //Starting a new recording regenerates session information
            OnPropertyChanged(() => CurrentVehicleType);
            OnPropertyChanged(() => CurrentAnchorageType);
            OnPropertyChanged(() => TrackId);
        }
Example #2
0
        private void HandleStopRecordingCommand()
        {
            Log.Debug("Executing stop recording command");

            _sensors.StopSensing();
            _recorder.Stop();

            OnPropertyChanged(() => IsRecording);

            RecordingStatusUpdated.Raise(this);
        }