Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Damaya

Junior Member
Registered:
Posts: 10
Reply with quote  #1 
Hi Jaewon,

I was recently testing out an old task we had in our library that utilized some runtimev1 functions.
This task was developed on an build of monkeylogic2 (Build 119) and we were trying to test it on a more recent build (Build 124).

In trying to make the task work in build 124 we receive this error from the console.
"""
Error using RSGFB_Timing_runtime/
eyejoytrack (line 481)
'holdtouch' requires only one target!

Error in RSGFB_Timing_runtime (line 1505)
held=eyejoytrack('holdtouch',button.both,vthresh.both,t.wait_release_start);

Error in run_trial (line 113)
        runtime(MLConfig,TrialRecord,TaskObject,TrialData);
       
Error in monkeylogic/UIcallback (line 1146)
                    result = run_trial(MLConfig,datafile);
 
Error while evaluating UIControl Callback.
"""

From what I can tell the eyejoytrack "holdtouch" function used to be able to take two button objects as input but now takes only one. We wanted to know if this is fixed in a later build or if there is a new change to the eyejoytrack function we are not fully aware of. Thanks!

As a sidenote we also tested the task on Build 155 and there appears to be the same problem. Thanks.
0
Jaewon

Administrator
Registered:
Posts: 954
Reply with quote  #2 
I didn't change the way that eyejoytrack works, but added a piece of code that makes an error if the number of buttons is more than one, under the assumption that all "hold" functions should accept only one object.

To test two buttons for button hold in NIMH ML, you can combine two "holdtouch"s in one eyejoytrack command, but it seems that the original ML allowed using two button arguments, so I have no objection to reverting the change.

I just need to ask you to confirm this before changing it back, since I can't test with the original ML now. What is the behavior you expect when you use two button arguments? Does the eyejoytrack return immediately when either button is released or when both of them are released?
0
Damaya

Junior Member
Registered:
Posts: 10
Reply with quote  #3 
Hi Jaewon,

Sorry for the late reply. According to the timing file of the task. The original function of eyejoytrack was to sense if either of the two buttons were held down. So it would return 1 if either button was held or 0 if both of them were released. Let me know if you need more information. Thanks!
0
Jaewon

Administrator
Registered:
Posts: 954
Reply with quote  #4 
That doesn't make sense. According to the description of eyejoytrack in the original ML website, the output is a scalar corresponding to the specific target acquired or held, when multiple target objects are specified. So the function should return a different number depending on either button 1 or 2 is held.

Plus, my question was when the eyejoytrack stops tracking. The difference between the 'acquire' and 'hold' functions is whether the function returns when the button press is detected. The 'acquire' function returns immediately and the 'hold' function doesn't.

The purpose of the 'hold' functions is to test if the object or button acquired in the previous eyejoytrack call stays in the same state. Since the 'acquire' functions return only one object, conceptually the 'hold' functions are supposed to take one object/button only. This is clearly stated in the NIMH ML manual.

I am going to test it with the original ML, when I have a chance next week, and decide what to do. I am looking into this, because the original ML manual is very vague about the behavior of eyejoytrack in this case and I didn't provide my own manual at that time. If the original ML's behavior is not the same as you describe, the direction of changes may not be the same as you expect.
0
Jaewon

Administrator
Registered:
Posts: 954
Reply with quote  #5 
Hi Damaya,

Would you show me your timing script code?. I need to know how your code interprets the result that eyejoytrack returns.
0
Damaya

Junior Member
Registered:
Posts: 10
Reply with quote  #6 
Sent it via email.
0
Jaewon

Administrator
Registered:
Posts: 954
Reply with quote  #7 
Hi Damaya,

I won't change the way that eyejoytrack currently works in NIMH ML. The code you showed was just exploiting a hole of the original ML. The return value of the original ML in this case is not consistent with the description of eyejoytrack and uninterpertable. I understand it is partly due to the limitation that only two functions can be combined in the original ML, but it should be fixed.

To test if two buttons are released, please use the following code.

held = true(1,2);
while any(held)
    held = eyejoytrack('holdtouch', button.left, vthresh.left, ...
        'holdtouch', button.right, vthresh.right, t.wait_release_start);

end

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.