mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 00:38:05 -06:00
Adds Pathweaver export test
This commit is contained in:
@@ -4,11 +4,14 @@
|
||||
|
||||
package frc4388.robot;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import frc4388.utility.RobotLogger;
|
||||
import frc4388.utility.RobotTime;
|
||||
|
||||
/**
|
||||
@@ -64,6 +67,7 @@ public class Robot extends TimedRobot {
|
||||
@Override
|
||||
public void disabledInit() {
|
||||
m_robotTime.endMatchTime();
|
||||
RobotLogger.getInstance().setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,6 +100,7 @@ public class Robot extends TimedRobot {
|
||||
m_autonomousCommand.schedule();
|
||||
}
|
||||
m_robotTime.startMatchTime();
|
||||
RobotLogger.getInstance().setEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,6 +120,7 @@ public class Robot extends TimedRobot {
|
||||
m_autonomousCommand.cancel();
|
||||
}
|
||||
m_robotTime.startMatchTime();
|
||||
RobotLogger.getInstance().setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,6 +132,16 @@ public class Robot extends TimedRobot {
|
||||
// m_robotContainer.getOperatorController().updateInput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testInit() {
|
||||
RobotLogger.getInstance().setEnabled(false);
|
||||
try {
|
||||
RobotLogger.getInstance().exportPath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called periodically during test mode.
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,7 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import frc4388.robot.RobotMap;
|
||||
import frc4388.robot.Constants.SwerveDriveConstants;
|
||||
import frc4388.utility.Gains;
|
||||
import frc4388.utility.RobotLogger;
|
||||
|
||||
public class SwerveDrive extends SubsystemBase {
|
||||
// private WPI_TalonFX m_leftFrontSteerMotor;
|
||||
@@ -142,6 +143,7 @@ public class SwerveDrive extends SubsystemBase {
|
||||
updateOdometry();
|
||||
// m_gyro.setFusedHeadingToCompass();
|
||||
// m_gyro.setYawToCompass();
|
||||
RobotLogger.getInstance().put("poseMeters", m_poseEstimator.getEstimatedPosition());
|
||||
super.periodic();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user