public void Update() { if (buffer == null) { return; } buffer.AcquireReadLock(); buffer.Read(dbuf); buffer.ReleaseReadLock(); data.Parse(dbuf, 0); }
// Update is called once per frame void Update() { if (buffer == null) { return; } buffer.AcquireReadLock(); buffer.Read(dbuf); buffer.ReleaseReadLock(); data.Parse(dbuf, 0); Debug.Log(data.joints.rt_arm.left[0].ToString()); /* * data [2] = (byte)((data [2]+1)%127); * * * buffer.AcquireWriteLock (); * buffer.Write<byte> (data); * buffer.ReleaseWriteLock ();*/ }