diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index f9d1a95..679ba3e 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -19,7 +19,7 @@ public class Robot extends TimedRobot { public Robot() { - DogLog.setOptions(new DogLogOptions().withLogEntryQueueCapacity(1500).withNtPublish(true)); + DogLog.setOptions(new DogLogOptions().withNtPublish(true)); // Record metadata DogLog.log("Metadata/ProjectName", BuildConstants.MAVEN_NAME); @@ -66,6 +66,29 @@ public void robotInit() {} @Override public void robotPeriodic() { CommandScheduler.getInstance().run(); + + + // left trigger: intake + // right trigger: shoot + + DogLog.log("Test/RobotPeriodic", true); + + queuer.setIntakeMode(controller.getLeftTriggerAxis() >= 0.5); + queuer.setShootingMode(controller.getRightTriggerAxis() >= 0.5); + + // if (controller.getLeftTriggerAxis() >= 0.5) { + // queuer.setIntakeMode(true); + // } else if (controller.getLeftTriggerAxis() < 0.5) { + // queuer.setIntakeMode(false); + // } + + // if (controller.getRightTriggerAxis() >= 0.5) { + // queuer.setShootingMode(true); + // } else if (controller.getRightTriggerAxis() < 0.5) { + // queuer.setShootingMode(false); + // } + + } @Override diff --git a/src/main/java/frc/robot/queuer/QueuerSubsystem.java b/src/main/java/frc/robot/queuer/QueuerSubsystem.java index 9f23136..b7cde68 100644 --- a/src/main/java/frc/robot/queuer/QueuerSubsystem.java +++ b/src/main/java/frc/robot/queuer/QueuerSubsystem.java @@ -2,6 +2,7 @@ import com.revrobotics.CANSparkMax; +import dev.doglog.DogLog; import frc.robot.util.scheduling.LifecycleSubsystem; import frc.robot.util.scheduling.SubsystemPriority; @@ -22,6 +23,9 @@ public QueuerSubsystem(CANSparkMax motor) { @Override public void robotPeriodic() { + DogLog.log("Queuer/IntakeMode", intaking); + DogLog.log("Queuer/ShootingMode", shooting); + if (intaking) { motor.set(0.3); } else if (shooting) { @@ -33,10 +37,10 @@ public void robotPeriodic() { //if shooting set motor voltage to -0.5 //if neither set voltage to 0 } -public boolean setIntakeMode() { - return intaking = true; +public void setIntakeMode(boolean enabled) { + intaking = enabled; } -public boolean setShootingMode() { - return shooting = true; +public void setShootingMode(boolean on) { + shooting = on; } } \ No newline at end of file