|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Is my Java code ok?
I see that you initialized the RobotDrive with the port numbers of your speed controllers. I believe that this will work correctly because you are using victors, but it would be better practice to initialize it with the two speed controllers you already initialized.
Code:
drive = new RobotDrive(drivermotor1, drivemotor2); |
|
#2
|
|||
|
|||
|
Re: Is my Java code ok?
For us, although the code said "build successful" for code similar as shown below, it will throw an error (on the robot) and the driver station noted no code on the robot.
Code:
drivemotor1 = new Victor(0); drivemotor2 = new Victor(2); ... drive = new RobotDrive(0, 2); Once we did this change, everything worked fine. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|