-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ac4c96
commit 5d69f7b
Showing
102 changed files
with
304 additions
and
277 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...com/team766/framework3/AdvancedUtils.java → .../com/team766/framework/AdvancedUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team766.framework3; | ||
package com.team766.framework; | ||
|
||
public class AdvancedUtils { | ||
/** | ||
|
5 changes: 2 additions & 3 deletions
5
...om/team766/framework3/AutonomousMode.java → ...com/team766/framework/AutonomousMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...va/com/team766/framework3/Conditions.java → ...ava/com/team766/framework/Conditions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/team766/framework3/Context.java → ...n/java/com/team766/framework/Context.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team766.framework3; | ||
package com.team766.framework; | ||
|
||
import java.util.function.BooleanSupplier; | ||
|
||
|
4 changes: 1 addition & 3 deletions
4
...a/com/team766/framework3/ContextImpl.java → ...va/com/team766/framework/ContextImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ramework3/FunctionalInstantProcedure.java → ...framework/FunctionalInstantProcedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team766.framework3; | ||
package com.team766.framework; | ||
|
||
import java.util.Set; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...am766/framework3/FunctionalProcedure.java → ...eam766/framework/FunctionalProcedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...om/team766/framework3/InstantCommand.java → ...com/team766/framework/InstantCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team766.framework3; | ||
package com.team766.framework; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.../team766/framework3/InstantProcedure.java → ...m/team766/framework/InstantProcedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m/team766/framework3/LaunchedContext.java → ...om/team766/framework/LaunchedContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/com/team766/framework3/LoggingBase.java → ...va/com/team766/framework/LoggingBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ava/com/team766/framework3/Mechanism.java → ...java/com/team766/framework/Mechanism.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ava/com/team766/framework3/Procedure.java → ...java/com/team766/framework/Procedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/team766/framework3/Request.java → ...n/java/com/team766/framework/Request.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
.../team766/framework3/ReservingCommand.java → ...m/team766/framework/ReservingCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ain/java/com/team766/framework3/Rule.java → ...main/java/com/team766/framework/Rule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...va/com/team766/framework3/RuleEngine.java → ...ava/com/team766/framework/RuleEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m/team766/framework3/RulePersistence.java → ...om/team766/framework/RulePersistence.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.team766.framework3; | ||
package com.team766.framework; | ||
|
||
public enum RulePersistence { | ||
ONCE, | ||
|
3 changes: 1 addition & 2 deletions
3
.../team766/framework3/SchedulerMonitor.java → ...m/team766/framework/SchedulerMonitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...om/team766/framework3/SchedulerUtils.java → ...com/team766/framework/SchedulerUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m/team766/framework3/SensorMechanism.java → ...om/team766/framework/SensorMechanism.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/com/team766/framework/SerializableLambda.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.team766.framework; | ||
|
||
import java.io.Serializable; | ||
import java.lang.invoke.SerializedLambda; | ||
import java.lang.reflect.Method; | ||
|
||
public interface SerializableLambda extends Serializable { | ||
public interface Runnable extends java.lang.Runnable, SerializableLambda {} | ||
|
||
public interface Supplier<T> extends java.util.function.Supplier<T>, SerializableLambda {} | ||
|
||
private static SerializedLambda getSerializedLambda(SerializableLambda lambda) { | ||
SerializedLambda serializedLambda = null; | ||
for (Class<?> cl = lambda.getClass(); cl != null; cl = cl.getSuperclass()) { | ||
try { | ||
Method method = cl.getDeclaredMethod("writeReplace"); | ||
method.setAccessible(true); | ||
Object replacement = method.invoke(lambda); | ||
if (!(replacement instanceof SerializedLambda)) { | ||
break; // custom interface implementation | ||
} | ||
serializedLambda = (SerializedLambda) replacement; | ||
break; | ||
} catch (NoSuchMethodException e) { | ||
// ignore | ||
} catch (ReflectiveOperationException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
if (serializedLambda == null) { | ||
throw new IllegalArgumentException("Cannot find SerializedLambda for " + lambda); | ||
} | ||
return serializedLambda; | ||
} | ||
|
||
/* package */ static Object[] getLambdaCaptures(SerializableLambda lambda) { | ||
final SerializedLambda serializedLambda = getSerializedLambda(lambda); | ||
final int count = serializedLambda.getCapturedArgCount(); | ||
final Object[] result = new Object[count]; | ||
for (int i = 0; i < count; ++i) { | ||
result[i] = serializedLambda.getCapturedArg(i); | ||
} | ||
return result; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/java/com/team766/framework3/Status.java → ...in/java/com/team766/framework/Status.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ava/com/team766/framework3/StatusBus.java → ...java/com/team766/framework/StatusBus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...66/framework3/WPILibCommandProcedure.java → ...766/framework/WPILibCommandProcedure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.