public void OnLock(string message)
    {
        ThalmicMyo targetMyo = GetMyo("test");

        if (targetMyo != null)
        {
            if (ThalmicHub.DidUnlockDevice != null)
            {
                ThalmicHub.DidUnlockDevice(targetMyo);
            }
            targetMyo._myoUnlocked = false;
        }
    }
Beispiel #2
0
    void didUnlockDevice(string eventData)
    {
        if (eventData == null || eventData.Length == 0)
        {
            return;
        }

        var dict = Json.Deserialize(eventData) as Dictionary <string, object>;

        string     myoIdentifier = (string)dict["myoIdentifier"];
        ThalmicMyo targetMyo     = GetMyo(myoIdentifier);

        if (targetMyo != null)
        {
            if (ThalmicHub.DidUnlockDevice != null)
            {
                ThalmicHub.DidUnlockDevice(targetMyo);
            }
            targetMyo._myoUnlocked = true;
        }
    }