コード例 #1
0
    public override void Awake()
    {
        base.Awake();
        m_rbf = new RBFCore(1, 1);
        m_rbf.setSigma(m_sigma);

        //m_plugs = GetComponentsInChildren<RBFPlugAttachment>();

        SetAsDock(true);
        AddAcceptedDocktype(typeof(RBFTrainingAttachment));
        EnableControls();
        ShowControls();
    }
コード例 #2
0
    void Awake( )
    {
        m_arduino = GetComponent <Arduino>();
        if (m_arduino == null)
        {
            throw new Exception("No arduino component found on glove!");
        }

        m_arduino.Setup(ConfigurePins);
        m_rbf = new RBFCore(m_bendPins.Length, m_gestures.Length);
        m_rbf.setSigma(m_sigma);
        m_bendValues                = new double[m_bendPins.Length];
        m_gestureVelocity           = new double[m_gestures.Length];
        m_lastGestureOutput         = new double[m_gestures.Length];
        m_currentCalibrationSamples = new List <double[]>();
    }