I am trying to control our Cortex with a Logitech 310 USB controller.
Several months ago this worked great both through the PC (debug mode) or by plugging the 310 directly to the Cortex. I did not have to do anything but use the sample code.
2 months late I try it now there’s nothing !
The Joystick debugger shows the Joystick movement / buttons OK
In the loop I set a variable to = vexRT[Ch2] just to see if it’s seeing the data but the debug windows doesn’t list any variables! (globally or local)
So frankly have no idea what’s going on!
I have
Win 10x64
Robot C 4.55 (re-installed & another PC)
Cortex EDR
updated all the firmware (Cortex & ROBOTC)
Check the switch on the back of your f310. It has 2 operation modes and maybe only 1 works with the cortex? X or D
Unplug it after changing the switch position.
It is strange - I go to window - config joysticks and everything appears perfect. When I debug the joystick debugger doesn’t show 310 buttons (jusx XY 1 & 2).
Also I do not see any global or local variables. I declared an
int mctl;
… and set it to
mctl = joystick.joy1_x2;
… in the loop
But see literally nothing in the debug tabs. Also motor debug shows nothing is being sent to it ie joystick.joy1_x2 must be ‘0’.
This was no brainer before now TOO crazy!! Perhaps this is disabled in latest firmware/robotC ?
Thanks for reading!
CODE: #include “JoystickDriver.c”
in main - loop:
getJoystickSettings(joystick); // update buttons and joysticks
motor[m6] = joystick.joy1_x1;
motor[m7] = joystick.joy1_x2;