I encountered a problem with the eyejoytrack function used with a touchsreen.
If I well understood, you've first to use the argument 'touchtarget' as follow:
ontarget = eyejoytrack('touchtarget', CT, fix_radius,wait_for_touch)
%%The monkey has to touch 'CT' before wait_for_touch elapsed
And after to define the time he has to maintain his touch with 'releasetarget' as follow:
ontarget = eyejoytrack('releasetarget', CT, fix_radius, holding_CT);
if ~ontarget %If he releases the touch before the end of the holding time
In this second part of the task, when the monkey has to hold his touch for a defined holding_CT time, we want that the trail aborts in case of an early release.
As it is already the case for tasks with the eyetracker when the monkey break the fixation.
We realized that even if the monkey touch the CT without any holding time, ontarget become 1.
The defined Holding_CT time just serves as a clock to progress in the task, but it is not mandatory for the subject to maintain his touch during his time to success.
To be sure, we tried also a task found in the touchscreen package, named 'touch_release' and we encountered the same problem. On this task the part for the holding was written as follow:
ontargets = eyejoytrack('releasetarget', touchTargetLeftFilled, windowSize, holdDuration);
if (ontargets == 1)
toggleobject(touchTargetLeftNotFilled, 'Status', 'off');
toggleobject(touchTargetLeftFilled, 'Status', 'on');
disp('<<< touch_release.m >>> Object 1 releasetarget');
disp('<<< touch_release.m >>> Object 1 premature release');
We tried to perform correct trials as well as early releases and it never enters on the "else" part, ontargets was always 1.
Sorry for the long post, I hope the problem we encountered is clear.
Thank you in advance for your suggestions,