Skip to content

Commit a3eac27

Browse files
committed
Merge branch 'master' into no-temp-limit
2 parents 61c8c45 + 132ad8a commit a3eac27

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public final class Mocks {
2424
private static final List<WeakReference<Object>> MOCKS = Collections.synchronizedList(new ArrayList<>());
2525
private static final Predicate<WeakReference<?>> IS_REFERENCE_CLEARED = reference -> reference.get() == null;
2626
private static final Consumer<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK = reference -> Mockito.clearInvocations(reference.get());
27-
private static final Predicate<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERNCE_NOT_CLEARED = reference -> {
27+
private static final Predicate<WeakReference<Object>> CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERENCE_NOT_CLEARED = reference -> {
2828
if(IS_REFERENCE_CLEARED.test(reference)) return true;
2929
CLEAR_INVOCATIONS_ON_REFERENCED_MOCK.accept(reference);
3030
return false;
@@ -37,7 +37,7 @@ public final class Mocks {
3737
// 2) Garbage collected references are removed
3838
// 3) Mock is garbage collected
3939
// 4) Mock invocations are cleared -> throws NullPointerException
40-
Lib199Subsystem.registerPeriodic(() -> MOCKS.removeIf(CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERNCE_NOT_CLEARED));
40+
Lib199Subsystem.registerPeriodic(() -> MOCKS.removeIf(CLEAR_INVOCATIONS_ON_REFERENCED_MOCK_IF_REFERENCE_NOT_CLEARED));
4141
}
4242

4343
/**
@@ -61,7 +61,7 @@ public static <T, U> T createMock(Class<T> classToMock, U implClass, Class<?>...
6161
* @param <U> the class type which will be used to provide method implementations
6262
* @param classToMock the class type which will be mocked
6363
* @param implClass the object to which to try to forward method calls
64-
* @param forwardUnknownCalls whether methods which are not overriden will call their real methods
64+
* @param forwardUnknownCalls whether methods which are not overridden will call their real methods
6565
* @param interfaces a list of interfaces which the mocked object should extend
6666
* @return an instance of <code>T</code> in which some or all of the classes methods are replaced with a mocked implementation from <code>U</code>
6767
* @see #createMock(Class, Object, Class...)
@@ -77,7 +77,7 @@ public static <T, U> T createMock(Class<T> classToMock, U implClass, boolean for
7777
* @param <U> the class type which will be used to provide method implementations
7878
* @param classToMock the class type which will be mocked
7979
* @param implClass the object to which to try to forward method calls
80-
* @param defaultAnswer The answer to use when no overriden implementation is found
80+
* @param defaultAnswer The answer to use when no overridden implementation is found
8181
* @param interfaces a list of interfaces which the mocked object should extend
8282
* @return an instance of <code>T</code> in which some or all of the classes methods are replaced with a mocked implementation from <code>U</code>
8383
* @see #createMock(Class, Object, Class...)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static UsbCamera configureCamera() {
170170
}
171171

172172
/**
173-
* This method is equivilent to calling {@link #configureCamera()} {@code numCameras} times.
173+
* This method is equivalent to calling {@link #configureCamera()} {@code numCameras} times.
174174
* The last camera will be set as the primary Camera feed.
175175
* To change it, call {@code CameraServer.getServer().setSource()}.
176176
*

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ private static <T extends Enum<T>> void reportError(String vendor, T error, T ok
4949
if(error == null || error == ok) {
5050
return;
5151
}
52-
System.err.println("Error: " + error.name() + " occured while configuring " + vendor + " motor");
52+
System.err.println("Error: " + error.name() + " occurred while configuring " + vendor + " motor");
5353
System.err.println("Full stack trace:");
5454
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
5555
System.err.println(Arrays.toString(stack));
5656
}
5757

5858
public static void checkSparkMaxErrors(CANSparkMax spark) {
59-
//Purposely obivously impersonal to differentiate from actual computer generated errors
59+
//Purposely obviously impersonal to differentiate from actual computer generated errors
6060
short faults = spark.getFaults();
6161
short stickyFaults = spark.getStickyFaults();
6262
short prevFaults = flags.containsKey(spark) ? flags.get(spark) : 0;
@@ -128,7 +128,7 @@ public static void doReportSparkMaxTemp() {
128128
}
129129
}
130130

131-
// Check if temperature exceeds the setpoint or if the contoller has already overheated to prevent other code from resetting the current limit after the controller has cooled
131+
// Check if temperature exceeds the setpoint or if the controller has already overheated to prevent other code from resetting the current limit after the controller has cooled
132132
if(numTrips >= kOverheatTripCount) {
133133
if(numTrips < kOverheatTripCount + 1) {
134134
// Set trip count to kOverheatTripCount + 1 to flag that an error message has already been printed

0 commit comments

Comments
 (0)