#pragma config(Motor, port2, backrightwheel, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, backleftwheel, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, leftout, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, leftup, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, frontleftwheel, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, rightout, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, rightup, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, frontrightwheel, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//
task main()
{
while(1==1)
{
motor[frontleftwheel]=vexRT[Ch3];
motor[backleftwheel]=vexRT[Ch3];
motor[frontrightwheel]=vexRT[Ch2];
motor[backrightwheel]=vexRT[Ch2];
if(Btn5U==1)
{
motor[leftout]=127;
motor[rightout]=127;
}
else
{
motor[leftout]=0;
motor[rightout]=0;
}
if(Btn5D==1)
{
motor[leftout]=-127;
motor[rightout]=-127;
}
else
{
motor[leftout]=0;
motor[rightout]=0;
}
if(Btn6U==1)
{
motor[leftup]=127;
motor[rightup]=127;
}
else
{
motor[leftup]=0;
motor[rightup]=0;
}
if(Btn6D==1)
{
motor[leftup]=-127;
motor[rightup]=-127;
}
else
{
motor[leftup]=0;
motor[rightup]=0;
}
}
}
I received an error message for the first “if” statement, saying that there were mismatched typedefs.
Here is the entire message:
“Warning:Mismatched typedefs. Converting typedef ‘char’ to typedef ‘TVexJoysticks’, value ‘Ch2’”