Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
DHaehnke

Member
Registered:
Posts: 32
Reply with quote  #1 
Hello,

we're using a custom-built response device that outputs a positive voltage if it is moved in one direction and negative voltage if it is moved in the other.

The cursor on the screen, however, moves in the opposite direction of the direction the response device is moved to.

Is there an easy way to invert the joystick cursor movement?

Having looked into the code of trialholder.m, it seems that this could be accomplished by an input to tformfwd that would just negatively map the cursor position. Presumably, the tform would originate from joystick calibration. Unfortunately, the joystick calibration doesn't work for us.

Any ideas?

Thanks,

Daniel
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #2 
Hi,

I can suggest the following two things:

1) The calibrator should transform the joystick, so give it a second attempt. Is your analog input setting set to single ended or differential? you might want to try both before calibrating to see which one works right.

2) If calibration simply doesn't work for you, then you can hack the code. Unfortunately there isn't just one place where would need to perform the inversion. Neither is it in the tformfwd function. You would need to do it before the transformation took place. Look for code like this:

xp_eye = data(eyex);

yp_eye = data(eyey);

and add to it

yp_eye = yp_eye*-1;

there should be at least 3 places you need to do this; eyejoytrack, end_trial, and eye_position
0
Andy Mitz

Junior Member
Registered:
Posts: 8
Reply with quote  #3 
Unless your have wired the analog inputs for differential, make sure the GUI is set up for Single Ended.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.