예제 #1
0
 public RunData(string mode)
 {
     this.mode            = mode;
     events               = new List <Event>(2048); // 100 seconds recording if 1 event every 50ms (= 20Hz)
     runDistance          = new RunDistance(mode);
     runAdjust            = new RunAdjust();
     accelerationRecorder = new AccelerometerRecorder(false); // false: do not use queue mode
 }
예제 #2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            Analytics.TrackPage(Analytics.PAGE_RUN);

            isRunning        = true; // workaround for xamarin.com Bug 35407 - jobject muste not be IntPtr.Zero with Animation
            isLaunchDetected = false;
            isGpsOk          = false;
            isUnitKmh        = Settings.IsSpeedUnitKph();
            settleCounter    = SETTLE_COUNT_LIMIT;
            timeStampLastGps = DateTime.Now.Ticks;
            runAdjust        = new RunAdjust();
            runData          = new RunData(runModeProvider.Mode);

            Debug.LogToFile(runModeProvider.ToString());

            Device.StartTimer(TimeSpan.FromMilliseconds(SPEEDO_UPDATE_RATE_MS), OnTimer);

            gpsProvider.SetListener(this);
            accelerometerProvider.SetListener(this);
        }