mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-09 00:38:01 -06:00
Formating and Conventions Work
- Moved controller code to utilities - added m_ prefix to member variables to stick with conventions
This commit is contained in:
@@ -15,6 +15,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
|||||||
import frc4388.robot.commands.ExampleCommand;
|
import frc4388.robot.commands.ExampleCommand;
|
||||||
import frc4388.robot.subsystems.ExampleSubsystem;
|
import frc4388.robot.subsystems.ExampleSubsystem;
|
||||||
import frc4388.robot.subsystems.LED;
|
import frc4388.robot.subsystems.LED;
|
||||||
|
import frc4388.utility.controller.XboxController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The VM is configured to automatically run this class, and to call the
|
* The VM is configured to automatically run this class, and to call the
|
||||||
@@ -25,7 +26,7 @@ import frc4388.robot.subsystems.LED;
|
|||||||
*/
|
*/
|
||||||
public class Robot extends TimedRobot {
|
public class Robot extends TimedRobot {
|
||||||
public static ExampleSubsystem m_subsystem = new ExampleSubsystem();
|
public static ExampleSubsystem m_subsystem = new ExampleSubsystem();
|
||||||
public static LED led = new LED();
|
public static LED m_led = new LED();
|
||||||
public static OI m_oi;
|
public static OI m_oi;
|
||||||
|
|
||||||
Command m_autonomousCommand;
|
Command m_autonomousCommand;
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import edu.wpi.first.wpilibj.command.Command;
|
|||||||
|
|
||||||
public class setLEDPattern extends Command {
|
public class setLEDPattern extends Command {
|
||||||
|
|
||||||
LEDPatterns pattern;
|
public static LEDPatterns m_pattern;
|
||||||
|
|
||||||
public setLEDPattern(LEDPatterns pattern) {
|
public setLEDPattern(LEDPatterns pattern) {
|
||||||
requires(Robot.led);
|
requires(Robot.m_led);
|
||||||
this.pattern = pattern;
|
m_pattern = pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called just before this Command runs the first time
|
// Called just before this Command runs the first time
|
||||||
@@ -29,7 +29,7 @@ public class setLEDPattern extends Command {
|
|||||||
// Called repeatedly when this Command is scheduled to run
|
// Called repeatedly when this Command is scheduled to run
|
||||||
@Override
|
@Override
|
||||||
protected void execute() {
|
protected void execute() {
|
||||||
Robot.led.setPattern(pattern);
|
Robot.m_led.setPattern(m_pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make this return true when this Command no longer needs to run execute()
|
// Make this return true when this Command no longer needs to run execute()
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ public enum LEDPatterns {
|
|||||||
|
|
||||||
// GETTERS/SETTERS
|
// GETTERS/SETTERS
|
||||||
private final float id;
|
private final float id;
|
||||||
LEDPatterns(float id) { this.id = id; }
|
LEDPatterns(float id) {
|
||||||
public float getValue() { return id; }
|
this.id = id;
|
||||||
|
}
|
||||||
|
public float getValue() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package frc4388.controller;
|
package frc4388.utility.controller;
|
||||||
|
|
||||||
public interface IHandController {
|
public interface IHandController {
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package frc4388.controller;
|
package frc4388.utility.controller;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.Joystick;
|
import edu.wpi.first.wpilibj.Joystick;
|
||||||
|
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package frc4388.controller;
|
package frc4388.utility.controller;
|
||||||
|
|
||||||
import frc4388.controller.XboxController;
|
import frc4388.utility.controller.XboxController;
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.buttons.Button;
|
import edu.wpi.first.wpilibj.buttons.Button;
|
||||||
|
|
||||||
Reference in New Issue
Block a user