Exemple #1
0
 void myo_OnLock(object sender, Thalmic.Myo.MyoEventArgs e)
 {
     lock (_lock)
     {
         _myoUnlocked = false;
     }
 }
 void myo_OnArmUnsync(object sender, Thalmic.Myo.MyoEventArgs e)
 {
     lock (_lock) {
         _myoArmSynced  = false;
         _myoArm        = Arm.Unknown;
         _myoXDirection = XDirection.Unknown;
     }
 }
Exemple #3
0
 void myo_OnArmLost(object sender, Thalmic.Myo.MyoEventArgs e)
 {
     lock (_lock) {
         _myoArmRecognized = false;
         _myoArm           = Arm.Unknown;
         _myoXDirection    = XDirection.Unknown;
     }
 }
 void hub_MyoPaired(object sender, Thalmic.Myo.MyoEventArgs e)
 {
     foreach (ThalmicMyo myo in _myos)
     {
         if (myo.internalMyo == null)
         {
             myo.internalMyo = e.Myo;
             break;
         }
     }
 }
Exemple #5
0
    void hub_MyoPaired(object sender, Thalmic.Myo.MyoEventArgs e)
    {
        //Debug.Log (.Keys.);
        e.Myo.Vibrate(Thalmic.Myo.VibrationType.Medium);

        foreach (ThalmicMyo myo in _myos)
        {
            if (myo.internalMyo == null)
            {
                myo.internalMyo = e.Myo;
                break;
            }
        }
    }
Exemple #6
0
 void hub_MyoPaired(object sender, Thalmic.Myo.MyoEventArgs e)
 {
     lock (_lock) {
         _newlyPairedMyos.Add(e.Myo);
     }
 }
Exemple #7
0
 private void AndroidMyoConnector_MyoConnected(object sender, MyoEventArgs e)
 {
     var androidMyo = _androidListener.AddComponent<AndroidMyo>();
     _myos[0].internalMyo = androidMyo;
     #if DEBUG
     androidMyo.Init(true);
     #else
     androidMyo.Init(false);
     #endif
 }