Skip to content

Commit

Permalink
2D Markers Spawn and Dictionary keys accessible
Browse files Browse the repository at this point in the history
Cases gaze.2d.0. and gaze.2d.1. added because new pupil version v1.8 does not switch to the case gaze anymore. 2D calibration works for us now and can be tested with the MarketScene.
  • Loading branch information
mikkeyboi committed Aug 17, 2018
1 parent af2ecb4 commit 422478d
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 422478d

Please sign in to comment.