ok, so i'm setting up just the basic tank drive for our robot. i'm using code from one of the, what i assume, was a beta team. and it seems to check out to me.
Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
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 RobotTemplate2 extends SimpleRobot {
private RobotDrive drivetrain;
private Joystick leftStick;
/**
* This function is called once each time the robot enters autonomous mode.
*/
public RobotTemplate2(){
drivetrain = new RobotDrive(1,2);
leftStick = new Joystick(1);
}
public void autonomous() {
getWatchdog().feed();
}
/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
getWatchdog().setEnabled(false);
while (isOperatorControl()){
drivetrain.drive(leftStick.getY(), leftStick.getX());
//slower itterations seem to work more smoothely
Timer.delay(0.005);
}
stop();
}
public void stop(){
drivetrain.drive(0.0,0.0);
}
}
but when i send it over to the cRIO, on net beans on the consol, it says
"no user supplied robotmain"
now after i detach the computer with netbeans and plug the cRIO into the classmate via ethernet, it works fine, i can select autonomous, and hit start and the light will blink like its supposed to. but nothing happens. which makes sense. but when i set it to teleop, and make it run, still nothing will happen on the robot.
when i move either of the joysticks, there is no activity. when i look under setup on the classmate and move the joysticks it shows no activity, but when i press a button the coresponding one will light up blue.
also on the operation screen on the small status window, i get a message "watchdog not fed".
been trying to get this work for 3 days now, the big problem is that i feel i should have had this done by the end of the first day. any help would be great.