mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Updates
This commit is contained in:
@@ -25,7 +25,6 @@ import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
||||
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||
import edu.wpi.first.wpilibj2.command.button.Trigger;
|
||||
import frc4388.robot.commands.MoveForTimeCommand;
|
||||
import frc4388.robot.commands.Autos.neoPlaybackChooser;
|
||||
import frc4388.robot.constants.Constants;
|
||||
import frc4388.robot.constants.Constants.OIConstants;
|
||||
import frc4388.robot.constants.Constants.SimConstants.Mode;
|
||||
@@ -81,7 +80,6 @@ public class RobotContainer {
|
||||
// ! /* Autos */
|
||||
private SendableChooser<String> autoChooser;
|
||||
private Command autoCommand;
|
||||
private neoPlaybackChooser m_autoChooser= new neoPlaybackChooser(m_robotSwerveDrive, null);
|
||||
|
||||
public RobotContainer() {
|
||||
|
||||
@@ -191,7 +189,7 @@ public class RobotContainer {
|
||||
dir = new File("/home/lvuser/deploy/pathplanner/autos/");
|
||||
} else {
|
||||
// dir = new File("C:\\Users\\Ridgebotics\\Documents\\GitHub\\2025RidgeScape\\src\\main\\deploy\\pathplanner\\autos\\");
|
||||
dir = new File("/home/astatin3/Documents/GitHub/2025RidgeScape/src/main/deploy/pathplanner/autos");
|
||||
dir = new File("C:\\Users\\Ridgebotics\\Documents\\GitHub\\2026KPopRobotHunters\\src\\main\\deploy\\pathplanner\\autos");
|
||||
}
|
||||
|
||||
String[] autos = dir.list();
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"version": "2025.0",
|
||||
"command": {
|
||||
"type": "sequential",
|
||||
"data": {
|
||||
"commands": [
|
||||
{
|
||||
"type": "named",
|
||||
"data": {
|
||||
"name": "taxi"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resetOdom": true,
|
||||
"folder": null,
|
||||
"choreoAuto": false
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
AUTO file format
|
||||
|
||||
HEADER static size 0x5
|
||||
0x00 BYTE NUM AXES: defualts to 6
|
||||
0x01 BYTE NUM POV: defualts to 1
|
||||
0x02 BYTE NUM CONTROLLERS: defualts to 2
|
||||
0x03 SHORT FRAMES: any value greator or equal than one.
|
||||
|
||||
FRAME PER CONTROLLER: defualt size 0x34
|
||||
0x00 DOUBLE AXES[NUM AXES]
|
||||
0x30 SHORT BUTTONS
|
||||
0x32 SHORT POVs[NUM POV]
|
||||
|
||||
FRAME: size varrys
|
||||
FRAME PER CONTROLLER[NUM CONTROLLERS]
|
||||
INT UNIXTIMESTAMP
|
||||
|
||||
FILE:
|
||||
HEADER
|
||||
FRAME[FRAMES]
|
||||
@@ -1,107 +0,0 @@
|
||||
package frc4388.robot.commands.Autos;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import edu.wpi.first.wpilibj.shuffleboard.ComplexWidget;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.InstantCommand;
|
||||
import frc4388.robot.commands.Swerve.neoJoystickPlayback;
|
||||
import frc4388.robot.subsystems.swerve.SwerveDrive;
|
||||
import frc4388.utility.controller.VirtualController;
|
||||
|
||||
public class neoPlaybackChooser {
|
||||
private final SendableChooser<String> m_teamChosser = new SendableChooser<String>();
|
||||
private final SendableChooser<String> m_possitionChosser = new SendableChooser<String>();
|
||||
private final SendableChooser<String> m_autoNameChosser = new SendableChooser<String>();
|
||||
|
||||
|
||||
private final SwerveDrive m_swerve;
|
||||
private final VirtualController[] m_controllers;
|
||||
// private final ArrayList<SendableChooser<Command>> m_choosers = new ArrayList<>();
|
||||
// private SendableChooser<Command> m_playback = null;
|
||||
private final ArrayList<ComplexWidget> m_widgets = new ArrayList<>();
|
||||
// private final HashMap<String, Command> m_commandPool = new HashMap<>();
|
||||
|
||||
// private final File m_dir = new File("/home/lvuser/autos/");
|
||||
// private int m_cmdNum = 0;
|
||||
|
||||
// commands
|
||||
private Command m_noAuto = new InstantCommand();
|
||||
|
||||
public neoPlaybackChooser(SwerveDrive swerve, VirtualController[] controllers) {
|
||||
m_teamChosser.addOption("Red", "red");
|
||||
m_teamChosser.setDefaultOption("Blue", "blue");
|
||||
m_teamChosser.addOption("Nuetral", "nuetral");
|
||||
m_possitionChosser.addOption("AMP", "amp");
|
||||
m_possitionChosser.setDefaultOption("Center", "center");
|
||||
m_possitionChosser.addOption("Source", "source");
|
||||
m_swerve = swerve;
|
||||
m_controllers = controllers;
|
||||
SmartDashboard.putData("Team Chooser", m_teamChosser);
|
||||
SmartDashboard.putData("Position Chooser", m_possitionChosser);
|
||||
SmartDashboard.putData("Auto Name Chooser", m_autoNameChosser);
|
||||
}
|
||||
|
||||
public neoPlaybackChooser addOption(String name, String option) {
|
||||
m_autoNameChosser.addOption(name, option);
|
||||
return this;
|
||||
}
|
||||
|
||||
// public PlaybackChooser buildDisplay() {
|
||||
// for (int i = 0; i < 10; i++) {
|
||||
// appendCommand();
|
||||
// }
|
||||
// m_playback = m_choosers.get(0);
|
||||
// nextChooser();
|
||||
|
||||
// // ! This does not work, why?
|
||||
// Shuffleboard.getTab("Auto Chooser")
|
||||
// .add("Add Sequence", new InstantCommand(() -> nextChooser()))
|
||||
// .withPosition(4, 0);
|
||||
// return this;
|
||||
// }
|
||||
|
||||
// This will be bound to a button for the time being
|
||||
// public void render() {
|
||||
// // var chooser = new SendableChooser<Command>();
|
||||
// // // chooser.setDefaultOption("No Auto", m_noAuto);
|
||||
|
||||
// // m_choosers.add(chooser);
|
||||
// ComplexWidget widget = Shuffleboard.getTab("Neo Auto Chooser")
|
||||
// .add("Command: " + m_choosers.size(), chooser)
|
||||
// .withSize(4, 1)
|
||||
// .withPosition(0, m_choosers.size() - 1)
|
||||
// .withWidget(BuiltInWidgets.kSplitButtonChooser)
|
||||
// .withWidget(BuiltInWidgets.kComboBoxChooser);
|
||||
|
||||
|
||||
// m_widgets.add(widget);
|
||||
// }
|
||||
|
||||
// public void nextChooser() {
|
||||
// SendableChooser<Command> chooser = m_choosers.get(m_cmdNum++);
|
||||
|
||||
// String[] dirs = m_dir.list();
|
||||
|
||||
// if(dirs != null){ // Fix funny error
|
||||
// for (String auto : dirs) {
|
||||
// chooser.addOption(auto, new JoystickPlayback(m_swerve, auto));
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// for (var cmd_name : m_commandPool.keySet()) {
|
||||
// chooser.addOption(cmd_name, m_commandPool.get(cmd_name));
|
||||
// }
|
||||
// }
|
||||
|
||||
public String autoName() {
|
||||
return m_teamChosser.getSelected() + "_" + m_possitionChosser.getSelected() + "_" + m_autoNameChosser.getSelected() + ".auto";
|
||||
}
|
||||
|
||||
public Command getCommand() {
|
||||
return new neoJoystickPlayback(m_swerve, autoName(), m_controllers, true, true);
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 9;
|
||||
public static final String GIT_SHA = "c68329c9cac4515e1f14398d9ddab5a08b903db5";
|
||||
public static final String GIT_DATE = "2026-01-18 12:53:07 MST";
|
||||
public static final int GIT_REVISION = 11;
|
||||
public static final String GIT_SHA = "d30c807b0735998c3181d2fa0c83fde4ab9b3a6c";
|
||||
public static final String GIT_DATE = "2026-01-19 14:17:15 MST";
|
||||
public static final String GIT_BRANCH = "Autorotate";
|
||||
public static final String BUILD_DATE = "2026-01-19 13:36:57 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1768855017879L;
|
||||
public static final String BUILD_DATE = "2026-01-19 15:17:53 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1768861073727L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
Reference in New Issue
Block a user