Quote:
Originally Posted by Jared Russell
Those measurements are from the PWM port, right?
Can you post the full source code of the IterativeRobot test you just made?
|
Correct -- the measurements are from the PWM port.
Code:
package org.usfirst.frc.team2559.robot;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Talon;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* 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 Robot extends IterativeRobot {
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
Talon talon0 = new Talon(3);
Talon talon1 = new Talon(4);
public void robotInit() {
}
/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
talon0.set(-0.2);
talon1.set(0.2);
}
public void teleopInit() {
}
/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
}
/**
* This function is called periodically during test mode
*/
public void testPeriodic() {
}
}
At this point, due to the discrepancies in the PWM readings, I'm medium-high confident that the issue is being caused by the RoboRIO itself and not motor controllers. At the moment I'm testing trying not splitting the PWM cables and declaring each motor individually and just doing RobotDrive.tankDrive().
Are those readings normal? Has anyone ever had this issue of the PWM signals having about a 200ms delay hooked up to an oscilloscope? Is this expected and does calibrating the talons somehow take care of this?