Logger.recordOutput("Intake/Setpoint", setpointInches);
robotExtension.setLength(inchExtension);
- // Report velocity to SmartDashbboard
- // this returns rotations per second.
- double velocity = rollerMotor.getVelocity().getValueAsDouble();
- SmartDashboard.putNumber("Roller Velocity", velocity);
-
if(calibrating){
leftMotor.set(0.1);
rightMotor.set(-0.1);
}
public void simulationPeriodic(){
- // simulate the motor activities
// get the applied motor voltage
double voltage = rightMotor.getMotorVoltage().getValueAsDouble();
inputs.rightPosition = rotationsToInches(rightMotor.getPosition().getValueAsDouble());
inputs.leftCurrent = leftMotor.getStatorCurrent().getValueAsDouble();
inputs.rightCurrent = rightMotor.getStatorCurrent().getValueAsDouble();
+ inputs.rollerVelocity = rollerMotor.getVelocity().getValueAsDouble();
}
}
public static double rightPosition = 0.0;
public static double leftCurrent = 0.0;
public static double rightCurrent = 0.0;
+ public static double rollerVelocity = 0.0;
}
public void updateInputs();