how would I figure out how long I get back data from a HID or sensor?, is there a way to find out?
I added something else to the code now, and I am still getting the same error, I tried increasing and decreasing the delay and the same error still, I even enabled the Safety and disabled.
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.*;
/**
* 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 {
RobotDrive Drive = new RobotDrive(1, 2);
Joystick stick = new Joystick(1);
Victor m_shooter1 = new Victor(3);
Victor m_shooter2 = new Victor(3);
/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {
}
/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
while(isOperatorControl()){
Drive.arcadeDrive(stick);
Timer.delay(0.001);
m_shooter1.set((stick.getThrottle()/2)-0.5);
m_shooter1.set(((stick.getThrottle()/2)-0.5)*-1);
}
}
}