Could someone look at this and maybe see why it is not working? I made a function for driving so it would be easier to program Autons, but i cant get it to even work for driving. is there something I missed or just did wrong?
#pragma config(Motor, port2, FrontLeftGB, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port3, BackLeftGB, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, FrontRightGB, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, BackRightGB, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, FrontLeft, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, FrontRight, tmotorVex393_MC29, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
void drive(int left, int right, int time)//Time is for the Auton UNUSED in drive method
{
//Left Side Drive
motor[FrontLeft] = left;
motor[FrontLeftGB] = left;
motor[BackLeftGB] = left;
//Right Side Drive
motor[FrontRight] = right;
motor[FrontRightGB] = right;
motor[BackRightGB] = right;
wait1Msec(time);
}
task main()
{
bLCDBacklight = true; // Turn on LCD Backlight
string mainBattery;
while (1 == 1)
{
clearLCDLine(0);
clearLCDLine(1);
//Display the Primary Robot battery voltage
displayLCDString(0, 0, "Primary: ");
sprintf(mainBattery, "%1.2f%c", nImmediateBatteryLevel/1000.0,'V'); //Build the value to be displayed
displayNextLCDString(mainBattery);
displayLCDString(1, 0, "Good Luck!");
//Short delay for the LCD refresh rate
wait1Msec(100);
}
while (1 == 1)
{
drive(vexRT[Ch3], vexRT[Ch2], 0);
}
}