|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
C++ Tank Drive Help
Please help with the errors and how to use a xbox controller with it!
I am getting a few errors with my code! - Error: expected identifier before numeric constant - Error: ISO C++ forbids declarations of parameter with no type - Error: expected ',' or '...' before numeric constant -Syntax Error Code: #include "WPILib.h" class RobotDemo : public SimpleRobot { RobotDrive drivetrain(1, 2); Joystick leftStick(1); Joystick rightStick(2); public: RobotDemo() { GetWatchdog().SetEnabled(false); } void Autonomous() { } void OperatorControl() { while (1) // loop forever { drive.Tank(leftStick, rightStick); // drive with the joysticks Wait(0.005); } } }; START_ROBOT_CLASS(RobotDemo); |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|