Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.1.1"
id "edu.wpi.first.GradleRIO" version "2025.3.2"
}

java {
Expand Down
442 changes: 379 additions & 63 deletions src/main/java/frc4388/robot/Constants.java

Large diffs are not rendered by default.

28 changes: 24 additions & 4 deletions src/main/java/frc4388/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.logging.Level;

import com.ctre.phoenix6.CANBus;
import com.ctre.phoenix6.CANBus.CANBusStatus;

import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import frc4388.utility.CanDevice;
import frc4388.utility.DeferredBlock;
import frc4388.utility.DeferredBlockMulti;
import frc4388.utility.RobotTime;
import frc4388.utility.Status;
import frc4388.utility.Subsystem;
import frc4388.utility.Trim;
import frc4388.utility.Status.Report;
import frc4388.utility.Status.ReportLevel;
//import frc4388.robot.subsystems.LED;
Expand Down Expand Up @@ -63,7 +65,7 @@ public void run() {
Subsystem.subsystems.get(i).queryStatus();
}

System.out.println("Updated statuses!");
// System.out.println("Updated statuses!");

}
}catch(Exception e){
Expand All @@ -84,8 +86,9 @@ public void run() {
@Override
public void robotPeriodic() {
m_robotTime.updateTimes();
//System.out.println(m_robotContainer.limelight.isNearSpeaker());
//mled.updateLED();
// SmartDashboard.putNumber("Time", System.currentTimeMillis());

m_robotContainer.m_robotLED.update();
// Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled
// commands, running already-scheduled commands, removing finished or interrupted commands,
// and running subsystem periodic() methods. This must be called from the robot's periodic
Expand All @@ -110,6 +113,7 @@ public void disabledPeriodic() {
@Override
public void disabledExit() {
DeferredBlock.execute();
DeferredBlockMulti.execute();
}

/**
Expand Down Expand Up @@ -142,12 +146,20 @@ public void autonomousPeriodic() {

@Override
public void teleopInit() {
m_robotContainer.stop();
// This makes sure that the autonomous stops running when
// teleop starts running. If you want the autonomous to
// continue until interrupted by another command, remove
// this line or comment it out.

if (m_autonomousCommand != null) {
CommandScheduler.getInstance().cancel(m_autonomousCommand);
m_autonomousCommand.cancel();
m_autonomousCommand.end(true);
System.out.println("NOT Null!!");

} else {
System.out.println("Null!!");
}
m_robotTime.startMatchTime();
}
Expand All @@ -160,6 +172,14 @@ public void teleopPeriodic() {
// m_robotContainer.m_robotMap.rightFront.go(m_robotContainer.getDeadbandedDriverController().getLeft());
}

/**
* This function is called periodically during operator control.
*/
@Override
public void teleopExit() { // the only OTHER mode that teleop can enter into is disabled.
Trim.dumpAll();
}

@Override
public void testInit() {

Expand Down
Loading
Loading