Skip to content

Commit cb717d4

Browse files
committed
FEAT: Akit migration
1 parent 2394afe commit cb717d4

28 files changed

+272
-5373
lines changed

src/main/java/lib/devices/SimKraken.java

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/main/java/lib/drivers/LoggedCommandRobot.java

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,28 @@
66

77
package lib.drivers;
88

9-
import edu.wpi.first.wpilibj.DriverStation;
10-
import edu.wpi.first.wpilibj.TimedRobot;
9+
import org.littletonrobotics.junction.LoggedRobot;
10+
1111
import edu.wpi.first.wpilibj.Timer;
1212
import edu.wpi.first.wpilibj2.command.Command;
1313
import edu.wpi.first.wpilibj2.command.CommandScheduler;
14-
import edu.wpi.first.wpilibj2.command.button.Trigger;
1514
import lib.utils.Tracer;
16-
import monologue.Logged;
17-
import monologue.Monologue;
18-
import monologue.Monologue.MonologueConfig;
1915

20-
/** Inspired by https://github.com/wpilibsuite/allwpilib/pull/5939 */
21-
public abstract class LoggedCommandRobot extends TimedRobot implements Logged {
16+
/**
17+
* @see https://github.com/wpilibsuite/allwpilib/pull/5939
18+
*/
19+
public abstract class LoggedCommandRobot extends LoggedRobot {
2220
private final Timer gcTimer = new Timer();
2321
protected final CommandScheduler scheduler = CommandScheduler.getInstance();
2422

25-
public final Trigger disabled = new Trigger(() -> DriverStation.isDisabled());
26-
public final Trigger inTeleoperated = new Trigger(() -> DriverStation.isTeleopEnabled());
27-
public final Trigger inAutonomous = new Trigger(() -> DriverStation.isAutonomous());
28-
2923
private Command autonCommand;
3024

3125
public LoggedCommandRobot() {
32-
this(kDefaultPeriod);
26+
this(defaultPeriodSecs);
3327
}
3428

3529
public LoggedCommandRobot(double period) {
3630
super(period);
37-
// Monologue setup
38-
Monologue.setupMonologue(
39-
this,
40-
"/Logged",
41-
new MonologueConfig(DriverStation::isFMSAttached, "", false, true)
42-
.withDatalogPrefix("")
43-
.withOptimizeBandwidth(DriverStation::isFMSAttached)
44-
.withLazyLogging(true));
4531

4632
gcTimer.start();
4733
}
@@ -50,7 +36,6 @@ public LoggedCommandRobot(double period) {
5036
public void robotPeriodic() {
5137
// Profiles the Command Scheduler and Monologue
5238
Tracer.traceFunc("CommandScheduler", scheduler::run);
53-
Tracer.traceFunc("Monologue", Monologue::updateAll);
5439

5540
// RIO memory optimization
5641
if (gcTimer.hasElapsed(5)) {

src/main/java/lib/utils/MonologueUtils.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/main/java/monologue/Annotations.java

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)