Пример #1
0
 // Update is called once per frame
 public void Update()
 {
     if (notifier != null)
     {
         notifier.Check(OrientationLogger.CurrentOrientation(), logger.LastLogTimeNormalized);
     }
 }
Пример #2
0
    // Ugly calibration
    private float Calibrate(int measurements, float intervalSeconds)
    {
        System.Threading.Thread.Sleep(1000);
        float calibration = 0f;

        for (int i = 0; i < measurements; i++)
        {
            calibration += OrientationLogger.CurrentOrientation(false) / measurements;
            System.Threading.Thread.Sleep((int)intervalSeconds * 1000);
        }
        return(calibration);
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        // Set the right UI.

        gradualRange.SetActive(testType.value == 0);
        instantThreshold.SetActive(testType.value == 1);
        instantDelay.SetActive(testType.value == 1);


        if (Time.time - lastLogTime >= logInterval)
        {
            lastLoggedValue = OrientationLogger.CurrentOrientation(false);
            resultText.text = "Roll-angle: " + lastLoggedValue.ToString();
            lastLogTime     = Time.time;
        }
    }