So in our program, we just added the triggers to make our base go side to side, however it seems very jittery and is doing the same on the joysticks now for whatever reason. It works fine in autonomous
task usercontrol()
{
// User control code here, inside the loop
bLCDBacklight = true; // Turn on LCD Backlight
string mainBattery, backupBattery;
bLCDBacklight = true;
while (true)
{
clearLCDLine(0); // Clear line 1 (0) of the LCD
clearLCDLine(1); // Clear line 2 (1) of the LCD
//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);
motor[port3] = vexRT[Ch3];
motor[port5] = vexRT[Ch3];
motor[port2] = vexRT[Ch2];
motor[port4] = vexRT[Ch2];
motor[port1] = vexRT[Ch3Xmtr2];
motor[port10] = vexRT[Ch3Xmtr2];
if(vexRT[Btn5UXmtr2] == 1) // center wheel button 5U
{
motor[port7] = -100;
motor[port6] = -100;
motor[port8] = -100;
motor[port9] = -100;
}
else if(vexRT[Btn5DXmtr2] == 1)
{
motor[port7] = -95;
motor[port6] = -95;
motor[port8] = -95;
motor[port9] = -95;
}
else {
motor[port6] =0;
motor[port7] =0;
motor[port8] =0;
motor[port9] =0;
}
if(vexRT[Btn6UXmtr2] == 1) // center wheel button 5U
{
motor[port7] = -90;
motor[port6] = -90;
motor[port8] = -90;
motor[port9] = -90;
}
else if(vexRT[Btn6DXmtr2] == 1)
{
motor[port7] = -85;
motor[port6] = -85;
motor[port8] = -85;
motor[port9] = -85;
}
else
{
motor[port6] =0;
motor[port7] =0;
motor[port8] =0;
motor[port9] =0;
}
if(vexRT[Btn5U] == 1) // center wheel button 5U
{
motor[port3] =127;
motor[port5] =-127;
motor[port2] =-127;
motor[port4] =127;
}
else if(vexRT[Btn6U] == 1)
{
motor[port3] =-127;
motor[port5] =127;
motor[port2] =127;
motor[port4] =-127;
}
else
{
motor[port3] =0;
motor[port5] =0;
motor[port2] =0;
motor[port4] =0;
}
}
}
/* This is all the remote control commands and also has the command, that displays our main battery voltage and turns on the LCD backlight */