![]() |
Code changes not deploying to robot?
My team has deployed the following code to our robot:
package org.usfirst.frc.team4968.robot; import edu.wpi.first.wpilibj.SampleRobot; import edu.wpi.first.wpilibj.RobotDrive; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.Timer; public class Robot extends SampleRobot { RobotDrive myRobot; // class that handles basic drive operations Joystick leftStick; // set to ID 1 in DriverStation Joystick rightStick; // set to ID 2 in DriverStation public Robot() { myRobot = new RobotDrive(0, 1); myRobot.setExpiration(0.1); leftStick = new Joystick(0); rightStick = new Joystick(1); } public void operatorControl() { myRobot.setSafetyEnabled(true); while (isOperatorControl() && isEnabled()) { myRobot.arcadeDrive(leftStick); //myRobot.tankDrive(leftStick, rightStick); Timer.delay(0.005); // wait for a motor update time } } } Initially, the code was working. However we then tried redeploying the code with a few changes, and the robot stopped working. So, we reverted the code back to EXACTLY what it was when it was working, and redeployed it, but the robot still does not work. I believe this to because by our code is not successfully deploying to the robot, because no matter what we do, nothing seems to change and the robot does not respond. Could someone outline the code deploying process for us to ensure we are not missing anything? Does the build.xml file need to be updated? |
Re: Code changes not deploying to robot?
Before doing anything else, try using some System.out.println statements to make sure whether the code is or is not getting updated on the bot.
|
Re: Code changes not deploying to robot?
Quote:
|
Re: Code changes not deploying to robot?
System.out.println("Hello world"); will print a line of text containing "Hello world" in the console. You can substitute any string for "Hello world".
Then you can look at the console output to see if your text is printing. |
Re: Code changes not deploying to robot?
Quote:
|
Re: Code changes not deploying to robot?
All that means is that you put that statement in a loop (this is okay). More importantly, it means that your code is being deployed and updated properly.
|
Re: Code changes not deploying to robot?
The posted code is just for driving the robot... Have you verified through the driver station that the joysticks are still connected?. Unplugging them and then plugging them back in while the driver station is up can cause them to no longer be recognized or read.
|
Re: Code changes not deploying to robot?
Quote:
|
Re: Code changes not deploying to robot?
What do the lights on the motor controllers do when you enable the robot?
Also, when posting code, please use code tags to make it easier to read. To use a code tag place a [/code] at the end and a [code] at the beginning. Thanks. |
Re: Code changes not deploying to robot?
Quote:
|
Re: Code changes not deploying to robot?
Quote:
The flashing talons means that they are note being communicated with. Can you verify that the talons are plugged into the correct ports and that they are plugged in correctly? |
Re: Code changes not deploying to robot?
Quote:
Updated Code: Code:
package org.usfirst.frc.team4968.robot; |
Re: Code changes not deploying to robot?
Quote:
Code:
myRobot = new RobotDrive(0, 10); |
Re: Code changes not deploying to robot?
Quote:
|
Re: Code changes not deploying to robot?
Quote:
|
| All times are GMT -5. The time now is 13:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi