void RobotInit() { frontLeft = new VictorSP(0), rearLeft = new VictorSP(1), frontRight = new VictorSP(2), rearRight = new VictorSP(3); // Assigns the motors to the VictorSP class intake_Motor = new VictorSP(5); // Assigns the motor to the VictorSP class myDrive_all = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight); // Has the motors be used by the robot drive class and called by myDrive_all drivestick_left = new Joystick(0); // 0 in joystick is the port that the joystick is plugged into on the driverstation drivestick_right = new Joystick(5); // 5 in joystick is the port that the joystick is plugged into on the driverstation xbox = new Joystick(2);// 2 in joystick is the port that the xbox is plugged into on the driverstation. Xbox_Button_A = new JoystickButton(xbox, 1), Xbox_Button_B = new JoystickButton(xbox, 2), Xbox_Button_X = new JoystickButton(xbox, 3), Xbox_Button_Y = new JoystickButton(xbox, 4); // Ints A B X and Y buttons on xbox frontRight->SetInverted(true); // All drive train motors have to be inverted rearRight->SetInverted(true); rearLeft->SetInverted(true); frontLeft->SetInverted(true); }
CMDLViewerWindowTab( mxWindow *parent, int x, int y, int w, int h, int id = 0, int style = 0 ) : CTabWindow( parent, x, y, w, h, id, style ) { SetInverted( true ); m_nLastSelected = -1; m_flLastSelectedTime = -1; }
SRXPosition::SRXPosition(int id, double p, double i, double d, bool invert):CANTalon(id) { SetControlMode(CANTalon::kPosition); SetP(p); SetI(i); SetD(d); SetFeedbackDevice(CANTalon::QuadEncoder); invertMotor=invert; SetInverted(invert); if (invert) { ConfigFwdLimitSwitchNormallyOpen(false); } else { ConfigRevLimitSwitchNormallyOpen(false); } SetPosition(0); target=0; EnableControl(); }
CMDLViewerModelTab( mxWindow *parent, int x, int y, int w, int h, int id = 0, int style = 0 ) : CTabWindow( parent, x, y, w, h, id, style ) { SetInverted( true ); }