Hello. I am trying to get a head start on the new season by CAD and learning VCS. We are planning on using and X drive this year and I made this really simple code for driver control but have no way of testing until late summer probably. Anybody with more skills than me is welcome to point out anything wrong. Thanks! (Bleft is back left, Fleft is front left, etc.)
void usercontrol( void ) {
// User control code here, inside the loop
while (1){
Bleft.spin(vex::directionType::fwd, Controller1.Axis2.value() + Controller1.Axis4.value() - Controller1.Axis1, vex::velocityUnits::pct);
Fleft.spin(vex::directionType::fwd, Controller1.Axis2.value() + Controller1.Axis4.value() + Controller1.Axis1, vex::velocityUnits::pct);
Bright.spin(vex::directionType::fwd, Controller1.Axis2.value() - Controller1.Axis4.value() + Controller1.Axis1, vex::velocityUnits::pct);
Fright.spin(vex::directionType::fwd, Controller1.Axis2.value() - Controller1.Axis4.value() - Controller1.Axis1, vex::velocityUnits::pct);
vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources.
}
}