1 package org
.usfirst
.frc
.team3501
.robot
.commands
.driving
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 public class SlaveWheel
{
7 // Left motor and wheel(s) are Master, right motor and wheel(s) are slave
9 double masterVal
= Robot
.getDriveTrain().getLeftSpeed();
10 double slaveVal
= Robot
.getDriveTrain().getRightSpeed();
17 public double calculateError() {
18 distL
= Robot
.getDriveTrain().getLeftEncoderDistance();
19 distR
= Robot
.getDriveTrain().getRightEncoderDistance();
20 error
= distL
- distR
;
24 // repeat every 20 milliseconds?