Skip to content

Commit 457f12f

Browse files
authored
Merge branch 'master' into async-periodic
2 parents cf0fa0b + ed78b8f commit 457f12f

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/main/java/org/carlmontrobotics/lib199/CachedSparkMax.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.revrobotics.RelativeEncoder;
55
import com.revrobotics.SparkMaxPIDController;
66

7+
@Deprecated
78
public class CachedSparkMax extends CANSparkMax {
89

910
private RelativeEncoder encoder;

src/main/java/org/carlmontrobotics/lib199/MotorControllerFactory.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,9 @@ public static CANSparkMax createSparkMax(int id, int temperatureLimit) {
120120
public static CANSparkMax createSparkMax(int id, MotorConfig config) {
121121
CANSparkMax spark;
122122
if (RobotBase.isReal()) {
123-
spark = new CachedSparkMax(id, CANSparkMaxLowLevel.MotorType.kBrushless);
124-
if (spark.getFirmwareVersion() == 0) {
125-
spark.close();
126-
System.err.println("SparkMax on port: " + id + " is not connected!");
127-
return MotorErrors.createDummySparkMax();
128-
}
123+
spark = new CANSparkMax(id, CANSparkMaxLowLevel.MotorType.kBrushless);
129124
} else {
130-
spark = MockSparkMax.createMockSparkMax(id, CANSparkMaxLowLevel.MotorType.kBrushless);
125+
spark = MockSparkMax.createMockSparkMax(id, CANSparkMaxLowLevel.MotorType.kBrushless);
131126
}
132127

133128
MotorErrors.reportSparkMaxTemp(spark, config.temperatureLimit);

0 commit comments

Comments
 (0)