Skip to content

Commit

Permalink
add singleton and remove enum
Browse files Browse the repository at this point in the history
Co-authored-by: Zixi Feng <zixifeng12@users.noreply.github.com>
  • Loading branch information
cire694 and zixifeng12 committed Jan 23, 2024
1 parent ebe3794 commit c99cd3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
5 changes: 1 addition & 4 deletions src/main/java/com/stuypulse/robot/constants/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
*/
public interface Settings {

public enum Robot {
BIG_WANG
}


Robot ROBOT = Robot.BIG_WANG;

public interface Conveyor {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.stuypulse.robot.subsystems.Conveyor;

import com.stuypulse.robot.constants.Settings;

import edu.wpi.first.wpilibj.RobotBase;
import edu.wpi.first.wpilibj2.command.SubsystemBase;

/*
* field:
* - Motor (cansparkmax, kraken?)
* - NO sensors
* - shooter IR sensor
* - set mode
*
* Methods
Expand All @@ -21,15 +19,10 @@ public abstract class Conveyor extends SubsystemBase {
private static final Conveyor instance;

static{
if(RobotBase.isSimulation()){
// create a conveyor sim
instance = null;
}
else if(Settings.ROBOT == Settings.Robot.BIG_WANG){
if(RobotBase.isReal()){
instance = new ConveyorImpl();
}
else {
instance = null;//should be conveyor sim
} else{
instance = null;
}
}

Expand Down

0 comments on commit c99cd3a

Please sign in to comment.