Skip to content

Commit

Permalink
Merge pull request #52 from mikkeyboi/unity_gaze_tracking_v1.8
Browse files Browse the repository at this point in the history
2D Markers Spawn and Dictionary keys accessible
  • Loading branch information
mkassner authored Aug 22, 2018
2 parents af2ecb4 + 422478d commit e20819f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public bool isConnected
public int PORT = 50020;
public string subport = "59485";
public bool isLocal = true;
public float confidenceThreshold = 0.6f;

private Dictionary<string,SubscriberSocket> _subscriptionSocketForTopic;
private Dictionary<string,SubscriberSocket> subscriptionSocketForTopic
Expand Down Expand Up @@ -163,6 +164,8 @@ public void InitializeSubscriptionSocket(string topic)
Debug.Log(msgType);
break;
case "gaze":
case "gaze.2d.0.":
case "gaze.2d.1.":
case "pupil.0":
case "pupil.1":
var dictionary = MessagePackSerializer.Deserialize<Dictionary<string,object>> (mStream);
Expand All @@ -173,8 +176,11 @@ public void InitializeSubscriptionSocket(string topic)
PupilTools.UpdateCalibrationConfidence(eyeID,confidence);
break;
}
if (confidence > 0.6f && msgType == "gaze")
PupilTools.gazeDictionary = dictionary;
if ((confidence > confidenceThreshold) && msgType.StartsWith("gaze"))
{
PupilTools.gazeDictionary = dictionary;
}

break;
case "frame.eye.0":
case "frame.eye.1":
Expand Down

0 comments on commit e20819f

Please sign in to comment.