Skip to content

Commit

Permalink
move file and fix triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryLi-0 committed Jan 19, 2025
1 parent 6517147 commit 68ba313
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
0.0,
0.8500000238418579
],
"height": 140,
"height": 354,
"series": [
{
"color": [
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/sciborgs1155/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
import monologue.Monologue;
import org.littletonrobotics.urcl.URCL;
import org.sciborgs1155.lib.CommandRobot;
import org.sciborgs1155.lib.Dashboard;
import org.sciborgs1155.lib.FaultLogger;
import org.sciborgs1155.lib.InputStream;
import org.sciborgs1155.lib.Test;
import org.sciborgs1155.robot.Ports.OI;
import org.sciborgs1155.robot.commands.Autos;
import org.sciborgs1155.robot.commands.Dashboard;
import org.sciborgs1155.robot.drive.Drive;
import org.sciborgs1155.robot.elevator.Elevator;
import org.sciborgs1155.robot.led.LEDStrip;
Expand Down Expand Up @@ -156,7 +156,7 @@ private void configureBindings() {

// TODO: Add any additional bindings.

dashboard.A().onTrue(led.rainbow());
dashboard.a().whileTrue(led.rainbow());
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.sciborgs1155.lib;
package org.sciborgs1155.robot.commands;

import edu.wpi.first.networktables.NetworkTable;
import edu.wpi.first.networktables.NetworkTableEntry;
Expand All @@ -23,74 +23,74 @@ public Dashboard() {
}

private Trigger setTriggerBranch(String branch) {
return new Trigger(() -> (branch == entryTargetBranch.getString("")));
return new Trigger(() -> (branch.equals(entryTargetBranch.getString(""))));
}

private Trigger setTriggerLevel(int level) {
return new Trigger(() -> (level == entryTargetLevel.getInteger(0)));
}

public Trigger A() {
public Trigger a() {
return setTriggerBranch("A");
}

public Trigger B() {
public Trigger b() {
return setTriggerBranch("B");
}

public Trigger C() {
public Trigger c() {
return setTriggerBranch("C");
}

public Trigger D() {
public Trigger d() {
return setTriggerBranch("D");
}

public Trigger E() {
public Trigger e() {
return setTriggerBranch("E");
}

public Trigger F() {
public Trigger f() {
return setTriggerBranch("F");
}

public Trigger G() {
public Trigger g() {
return setTriggerBranch("G");
}

public Trigger H() {
public Trigger h() {
return setTriggerBranch("H");
}

public Trigger I() {
public Trigger i() {
return setTriggerBranch("I");
}

public Trigger J() {
public Trigger j() {
return setTriggerBranch("J");
}

public Trigger K() {
public Trigger k() {
return setTriggerBranch("K");
}

public Trigger L() {
public Trigger l() {
return setTriggerBranch("L");
}

public Trigger L1() {
public Trigger level1() {
return setTriggerLevel(1);
}

public Trigger L2() {
public Trigger level2() {
return setTriggerLevel(2);
}

public Trigger L3() {
public Trigger level3() {
return setTriggerLevel(3);
}

public Trigger L4() {
public Trigger level4() {
return setTriggerLevel(4);
}
}

0 comments on commit 68ba313

Please sign in to comment.