View unanswered posts | View active topics It is currently Sat Sep 20, 2014 4:04 pm






Reply to topic  [ 4 posts ] 
Pairing 2 Vexnet Joysticks using RobotC 2.31 
Author Message
Rookie

Joined: Wed Oct 20, 2010 12:30 pm
Posts: 4
Post Pairing 2 Vexnet Joysticks using RobotC 2.31
We upgraded RobotC to 2.31 and now our pairing code will no longer work. Here is an example of the code.

if(vexRT[btn6uXmtr2]==1)
{
motor[Rt]=127;
motor[Lt]=-127;
}
else if(vexRT[btn6dXmtr2]==1)
{
motor[Rt]=-127;
motor[Lt]=127;
}
else
{
motor[Rt]=0;
motor[Lt]=0;
}

Here is the error message we now get. **Error**:Undefined variable 'btn6uXmtr2'. 'short' assumed.

Any help would be great.


Mon May 23, 2011 6:36 pm
Profile
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post Re: Pairing 2 Vexnet Joysticks using RobotC 2.31
Quote:
**Error**:Undefined variable 'btn6uXmtr2'. 'short' assumed.

This error typically means the programmer misspelled something (or, which may be this case, ROBOTC changed the syntax when updating). The way to reference the buttons for the 2nd joystick has the b and u capitalized. (i.e. vexRT[Btn6UXmtr2])

Hope this helps,
Andrew

_________________
Check out my website! www.RoboDesigners.com

VRC Team 2190

Twitter: @RoboDesigners


Mon May 23, 2011 6:49 pm
Profile WWW
Rookie

Joined: Wed Oct 20, 2010 12:30 pm
Posts: 4
Post Re: Pairing 2 Vexnet Joysticks using RobotC 2.31
Andrew Thanks. That took away the "yellow" Spelling errors on the teacher station but we still get the same error on the student stations. Could there be a setting that needs to be changed? It looks like we have the correct code.

Andy


Tue May 24, 2011 11:19 am
Profile
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post Re: Pairing 2 Vexnet Joysticks using RobotC 2.31
amcclure wrote:
Could there be a setting that needs to be changed? It looks like we have the correct code.

On the "student" computers (the ones that still show the errors), make sure that you've selected "Cortex" as the micro-controller under "Robot > Platform Type > VEX 2.0 Cortex."

Andrew

_________________
Check out my website! www.RoboDesigners.com

VRC Team 2190

Twitter: @RoboDesigners


Tue May 24, 2011 4:55 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.