-
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
Showing
11 changed files
with
119 additions
and
96 deletions.
There are no files selected for viewing
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
25 changes: 17 additions & 8 deletions
25
src/main/java/frc/robot/maps/subsystems/CoralManipMap.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,30 +1,39 @@ | ||
package frc.robot.maps.subsystems; | ||
|
||
import java.util.function.BooleanSupplier; | ||
|
||
import com.chopshop166.chopshoplib.logging.DataWrapper; | ||
import com.chopshop166.chopshoplib.logging.LoggableMap; | ||
import com.chopshop166.chopshoplib.logging.data.MotorControllerData; | ||
import com.chopshop166.chopshoplib.motors.SmartMotorController; | ||
|
||
public class CoralManipMap implements LoggableMap<CoralManipMap.Data> { | ||
public SmartMotorController motor; | ||
public final SmartMotorController leftMotor; | ||
public final SmartMotorController rightMotor; | ||
public final BooleanSupplier sensor; | ||
|
||
public CoralManipMap() { | ||
this(new SmartMotorController()); | ||
this(new SmartMotorController(), new SmartMotorController(), () -> false); | ||
} | ||
|
||
public CoralManipMap(SmartMotorController motor) { | ||
this.motor = motor; | ||
public CoralManipMap(SmartMotorController leftMotor, SmartMotorController rightMotor, BooleanSupplier sensor) { | ||
this.leftMotor = leftMotor; | ||
this.rightMotor = rightMotor; | ||
this.sensor = sensor; | ||
} | ||
|
||
// Will add data/logging stuff when we need it | ||
|
||
@Override | ||
public void updateData(Data data) { | ||
data.motor.updateData(motor); | ||
data.leftMotor.updateData(leftMotor); | ||
data.rightMotor.updateData(rightMotor); | ||
data.gamePieceDetected = sensor.getAsBoolean(); | ||
|
||
} | ||
|
||
public static class Data extends DataWrapper { | ||
public MotorControllerData motor = new MotorControllerData(); | ||
public MotorControllerData leftMotor = new MotorControllerData(); | ||
public MotorControllerData rightMotor = new MotorControllerData(); | ||
public boolean gamePieceDetected; | ||
} | ||
|
||
} |
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
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,34 +1,35 @@ | ||
{ | ||
"fileName": "AdvantageKit.json", | ||
"name": "AdvantageKit", | ||
"version": "4.0.0", | ||
"uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", | ||
"frcYear": "2025", | ||
"mavenUrls": [ | ||
"https://frcmaven.wpi.edu/artifactory/littletonrobotics-mvn-release/" | ||
], | ||
"jsonUrl": "https://github.com/Mechanical-Advantage/AdvantageKit/releases/latest/download/AdvantageKit.json", | ||
"javaDependencies": [ | ||
{ | ||
"groupId": "org.littletonrobotics.akit", | ||
"artifactId": "akit-java", | ||
"version": "4.0.0" | ||
} | ||
], | ||
"jniDependencies": [ | ||
{ | ||
"groupId": "org.littletonrobotics.akit", | ||
"artifactId": "akit-wpilibio", | ||
"version": "4.0.0", | ||
"skipInvalidPlatforms": false, | ||
"isJar": false, | ||
"validPlatforms": [ | ||
"linuxathena", | ||
"windowsx86-64", | ||
"linuxx86-64", | ||
"osxuniversal" | ||
] | ||
} | ||
], | ||
"cppDependencies": [] | ||
"fileName": "AdvantageKit.json", | ||
"name": "AdvantageKit", | ||
"version": "4.1.0", | ||
"uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", | ||
"frcYear": "2025", | ||
"mavenUrls": [ | ||
"https://frcmaven.wpi.edu/artifactory/littletonrobotics-mvn-release/" | ||
], | ||
"jsonUrl": "https://github.com/Mechanical-Advantage/AdvantageKit/releases/latest/download/AdvantageKit.json", | ||
"javaDependencies": [ | ||
{ | ||
"groupId": "org.littletonrobotics.akit", | ||
"artifactId": "akit-java", | ||
"version": "4.1.0" | ||
} | ||
], | ||
"jniDependencies": [ | ||
{ | ||
"groupId": "org.littletonrobotics.akit", | ||
"artifactId": "akit-wpilibio", | ||
"version": "4.1.0", | ||
"skipInvalidPlatforms": false, | ||
"isJar": false, | ||
"validPlatforms": [ | ||
"linuxathena", | ||
"linuxx86-64", | ||
"linuxarm64", | ||
"osxuniversal", | ||
"windowsx86-64" | ||
] | ||
} | ||
], | ||
"cppDependencies": [] | ||
} |
Oops, something went wrong.