public bool SetInterpolationProfile(SenseGloveCs.Kinematics.InterpolationSet_IMU set) { if (linkedGlove != null) { linkedGlove.SetInterpolationValues(set.Serialize()); return(true); } return(false); }
protected override void SetupDevice() { this.linkedGlove = (SenseGlove)this.linkedDevice; //this.linkedGlove.OnFingerCalibrationFinished += LinkedGlove_OnCalibrationFinished; //uodating once so glovedata is available, but not through the UpdateHand command, as that one needs the glove to already be connected. SenseGloveCs.GloveData rawData = this.linkedGlove.GetData(false); this.linkedGloveData = new SenseGlove_Data(rawData); //Device has been linked, now retrieve calibration. string serialized; if (SG.Calibration.SG_CalibrationStorage.LoadInterpolation(SenseGloveCs.DeviceType.SenseGlove, linkedGloveData.gloveSide, out serialized)) { //Debug.Log("Loaded Calibration for the " + (linkedGloveData.gloveSide == GloveSide.LeftHand ? "Left Hand" : "Right Hand")); linkedGlove.SetInterpolationValues(serialized); //sets internal values } }