View Single Post
  #1   Spotlight this post!  
Unread 20-12-2011, 18:05
shuhao shuhao is offline
Registered User
FRC #4069 (Lo-Ellen Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Sudbury
Posts: 138
shuhao is an unknown quantity at this point
Robot getting disabled?

I just managed to deploy the code to the cRIO. For some reason, my sample code doesn't seems to be firing.


Code:
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends SimpleRobot {
    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
        RobotDrive drive = new RobotDrive(1, 2);
        for (int i=0; i<4; i++){
            System.out.println("Running drive " + i);
            drive.drive(0.5, 0);
            Timer.delay(2);
        }
        
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {

    }
}
Here's the last 2 entry in the log:
Code:
[cRIO] Default robotInit() method running, consider providing your own
[cRIO] Default disabled() method running, consider providing your own

Also BTW how do I compile on linux and deploy on windows? (I'm fine with ant)
Reply With Quote