I am trying to code a xdrive on vex code pro but dont know what im doing, i can program tank drive but not holonomic drive.
heres my code
/*----------------------------------------------------------------------------*/
/* */
/* Module: main.cpp */
/* Author: C:\Users\Daniel */
/* Created: Sat Apr 17 2021 */
/* Description: V5 project */
/* */
/*----------------------------------------------------------------------------*/
// ---- START VEXCODE CONFIGURED DEVICES ----
// Robot Configuration:
// [Name] [Type] [Port(s)]
// Leftfront motor 11
// Rightfront motor 1
// Leftrear motor 16
// Rightrear motor 12
// Controller1 controller
// ---- END VEXCODE CONFIGURED DEVICES ----
#include "vex.h"
using namespace vex;
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
//start by displaying what program is running on the LCD
Brain.Screen.setPenColor(color::blue);
Brain.Screen.print("Hello there");
Brain.Screen.newLine();
Brain.Screen.newLine();
Brain.Screen.setPenColor(color::red);
Brain.Screen.print("General Kenobi");
//create an infinate while loop to continually check the controller readings
while(1){
Leftfront.spin(forward,Controller1.Axis2.position()+Controller1.Axis1.position()+Controller1.Axis4.position(), percent);
Rightfront.spin(forward,Controller1.Axis2.position()+Controller1.Axis1.position()+Controller1.Axis4.position(), percent);
Rightrear.spin(forward,Controller1.Axis2.position()+Controller1.Axis1.position()+Controller1.Axis4.position(), percent);
Leftrear.spin(forward,Controller1.Axis2.position()+Controller1.Axis1.position()+Controller1.Axis4.position(), percent);
}
task::sleep(20);}