Home › Forums › Software Development › Waiting for Calibration
Tagged: calibration, CoreSDK, eyex
- This topic has 1 reply, 2 voices, and was last updated 5 years, 5 months ago by Grant [Tobii].
- AuthorPosts
- 07/04/2019 at 12:53 #10799William McCafferyParticipant
Hi,
I’m using the CoreSDK with an EyeX and have been calibrating the tracker using
_host.Context.LaunchConfigurationTool(Tobii.Interaction.Framework.ConfigurationTool.Recalibrate, (data) => { });
I’ve been trying to trigger an event after calibration so the device can start streaming data after calibration is complete. Is there a way to recognise when the user has completed calibration?
Many thanks,
William
09/04/2019 at 15:24 #10807Grant [Tobii]KeymasterHi @willmccaff and thanks for your query.
To recognise when calibration has completed you need to do set up a state observer listening for tracker status.
When tracker has left state ‘Configuring’ to state ‘Tracking’ you can create the actionable event.Please find the snippet of code below to illustrate:
EngineStateProvider engineStateProvider = new EngineStateProvider(_host.Context); EngineStateObserver<EyeTrackingDeviceStatus> _engineStateObserverTrackerState = engineStateProvider.CreateEyeTrackingDeviceStatusObserver(); _engineStateObserverTrackerState.Changed+= EngineStateObserverTrackerStateOnChanged; ... private void EngineStateObserverTrackerStateOnChanged(object sender, EngineStateValue<EyeTrackingDeviceStatus> e) { // Based on tracker status do various actions… }
Hopefully, this is exactly what you are looking for! Please try this out and let us know how you get on. Best Wishes.
- AuthorPosts
- You must be logged in to reply to this topic.