Пример #1
0
    /// <summary> Activate the next step of the Sense Glove's manual calibration sequence; reporting the next step. </summary>
    /// <param name="calibrationKey"></param>
    /// <returns></returns>
    public bool NextCalibrationStep(KeyCode calibrationKey)
    {
        if (!this.IsCalibrating())
        {
            // Start a new Calibration
            CalibrateVariable whatTo = CalibrateVariable.FingerVariables;

            //TODO : Make this dependant on solvers

            bool strt = this.StartCalibration(whatTo, CollectionMethod.Manual);
            if (strt)
            {
                SenseGlove_Debugger.Log("Started Calibration. Please stretch your fingers in front of you and press " + calibrationKey.ToString());
                return(true);
            }
        }
        else
        {
            bool added = this.glove.NextCalibrationStep();
            if (added)
            {
                this.convertedGloveData.calibrationStep = this.convertedGloveData.calibrationStep + 1;
                if (this.convertedGloveData.calibrationStep == 1)
                {
                    SenseGlove_Debugger.Log("Step 1 completed. Please bend you MCP joint to 45* and press " + calibrationKey.ToString());
                }
                else if (this.convertedGloveData.calibrationStep == 2)
                {
                    SenseGlove_Debugger.Log("Step 2 completed. Please bend you MCP joint to 90* and press " + calibrationKey.ToString());
                }
                else if (this.convertedGloveData.calibrationStep == 3)
                {
                    SenseGlove_Debugger.Log("Step 3 completed. Calculating...");
                }
            }
        }
        return(false);
    }