Use proper case with EncoderBase and DriveBase

This commit is contained in:
Austen Adler 2016-07-22 16:35:32 -04:00
parent 667a528b98
commit e04f4ba346
5 changed files with 10 additions and 10 deletions

View File

@ -1,9 +1,9 @@
package org.usfirst.frc.team2059.robot.commands;
import org.usfirst.frc.team2059.robot.subsystems.Drivebase;
import org.usfirst.frc.team2059.robot.subsystems.Encoderbase;
import org.usfirst.frc.team2059.robot.subsystems.DriveBase;
import org.usfirst.frc.team2059.robot.subsystems.EncoderBase;
import edu.wpi.first.wpilibj.command.Command;
public abstract class CommandBase extends Command {
protected static Encoderbase encoderbase = new Encoderbase();
protected static Drivebase drivebase = new Drivebase();
protected static EncoderBase encoderBase = new EncoderBase();
protected static DriveBase driveBase = new DriveBase();
}
// vim: sw=2:ts=2:sts=2

View File

@ -3,7 +3,7 @@ import org.usfirst.frc.team2059.robot.commands.CommandBase;
import org.usfirst.frc.team2059.robot.structs.EncoderValues;
public class LogEncoder extends CommandBase {
public LogEncoder() {
requires(encoderbase);
requires(encoderBase);
}
protected void initialize() {
}
@ -13,7 +13,7 @@ public class LogEncoder extends CommandBase {
return true;
}
protected void execute() {
EncoderValues values = encoderbase.getValues();
EncoderValues values = encoderBase.getValues();
System.out.println("==== Encoder log ====");
System.out.println("Count : " + values.getCount());
System.out.println("Distance : " + values.getDistance());

View File

@ -2,7 +2,7 @@ package org.usfirst.frc.team2059.robot.commands;
import org.usfirst.frc.team2059.robot.commands.CommandBase;
public class ResetEncoder extends CommandBase {
public ResetEncoder() {
requires(encoderbase);
requires(encoderBase);
}
protected void initialize() {
}
@ -10,7 +10,7 @@ public class ResetEncoder extends CommandBase {
return true;
}
protected void execute() {
encoderbase.resetEncoder();
encoderBase.resetEncoder();
}
protected void end() {
}

View File

@ -3,7 +3,7 @@ import org.usfirst.frc.team2059.robot.RobotMap;
import org.usfirst.frc.team2059.robot.commands.Drive;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.CANTalon;
public class Drivebase extends Subsystem {
public class DriveBase extends Subsystem {
CANTalon leftMotorOne = new CANTalon(RobotMap.driveLeftMotorOne);
CANTalon leftMotorTwo = new CANTalon(RobotMap.driveLeftMotorTwo);
CANTalon rightMotorOne = new CANTalon(RobotMap.driveRightMotorOne);

View File

@ -4,7 +4,7 @@ import org.usfirst.frc.team2059.robot.commands.Drive;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.Encoder;
import org.usfirst.frc.team2059.robot.structs.EncoderValues;
public class Encoderbase extends Subsystem {
public class EncoderBase extends Subsystem {
Encoder enc = new Encoder(0, 1, false, Encoder.EncodingType.k4X);
public void initDefaultCommand() {
//TODO: Not sure if we need a default command, not settingo one