]> git.taranathan.com Git - FRC2026.git/commitdiff
basic stuff
authoreileha <eileenhan369@gmail.com>
Wed, 28 Jan 2026 23:42:50 +0000 (15:42 -0800)
committereileha <eileenhan369@gmail.com>
Wed, 28 Jan 2026 23:42:50 +0000 (15:42 -0800)
simgui-ds.json [new file with mode: 0644]
src/main/java/frc/robot/Robot.java
src/main/java/frc/robot/subsystems/indexer/Spindexer.java [new file with mode: 0644]

diff --git a/simgui-ds.json b/simgui-ds.json
new file mode 100644 (file)
index 0000000..73cc713
--- /dev/null
@@ -0,0 +1,92 @@
+{
+  "keyboardJoysticks": [
+    {
+      "axisConfig": [
+        {
+          "decKey": 65,
+          "incKey": 68
+        },
+        {
+          "decKey": 87,
+          "incKey": 83
+        },
+        {
+          "decKey": 69,
+          "decayRate": 0.0,
+          "incKey": 82,
+          "keyRate": 0.009999999776482582
+        }
+      ],
+      "axisCount": 3,
+      "buttonCount": 4,
+      "buttonKeys": [
+        90,
+        88,
+        67,
+        86
+      ],
+      "povConfig": [
+        {
+          "key0": 328,
+          "key135": 323,
+          "key180": 322,
+          "key225": 321,
+          "key270": 324,
+          "key315": 327,
+          "key45": 329,
+          "key90": 326
+        }
+      ],
+      "povCount": 1
+    },
+    {
+      "axisConfig": [
+        {
+          "decKey": 74,
+          "incKey": 76
+        },
+        {
+          "decKey": 73,
+          "incKey": 75
+        }
+      ],
+      "axisCount": 2,
+      "buttonCount": 4,
+      "buttonKeys": [
+        77,
+        44,
+        46,
+        47
+      ],
+      "povCount": 0
+    },
+    {
+      "axisConfig": [
+        {
+          "decKey": 263,
+          "incKey": 262
+        },
+        {
+          "decKey": 265,
+          "incKey": 264
+        }
+      ],
+      "axisCount": 2,
+      "buttonCount": 6,
+      "buttonKeys": [
+        260,
+        268,
+        266,
+        261,
+        269,
+        267
+      ],
+      "povCount": 0
+    },
+    {
+      "axisCount": 0,
+      "buttonCount": 0,
+      "povCount": 0
+    }
+  ]
+}
index dfe02615387170776d73a257977bb4cc7be35280..903080269460504010ee8d7f9fce4ac392bccbe6 100644 (file)
@@ -23,7 +23,7 @@ import edu.wpi.first.wpilibj2.command.CommandScheduler;
 import frc.robot.constants.Constants;
 import frc.robot.constants.VisionConstants;
 import frc.robot.constants.swerve.DriveConstants;
-import frc.robot.util.BuildData;
+//import frc.robot.util.BuildData;
 
 /**
  * The VM is configured to automatically run this class, and to call the functions corresponding to
@@ -81,22 +81,23 @@ public class Robot extends LoggedRobot {
         RobotId robotId = RobotId.getRobotId();
 
           // Record metadata
-        Logger.recordMetadata("ProjectName", BuildData.MAVEN_NAME);
-        Logger.recordMetadata("BuildDate", BuildData.BUILD_DATE);
-        Logger.recordMetadata("GitSHA", BuildData.GIT_SHA);
-        Logger.recordMetadata("GitDate", BuildData.GIT_DATE);
-        Logger.recordMetadata("GitBranch", BuildData.GIT_BRANCH);
-        switch (BuildData.DIRTY) {
-        case 0:
-            Logger.recordMetadata("GitDirty", "All changes committed");
-            break;
-        case 1:
-            Logger.recordMetadata("GitDirty", "Uncomitted changes");
-            break;
-        default:
-            Logger.recordMetadata("GitDirty", "Unknown");
-            break;
-        }
+        // Logger.recordMetadata("ProjectName", BuildData.MAVEN_NAME);
+        // Logger.recordMetadata("BuildDate", BuildData.BUILD_DATE);
+        // Logger.recordMetadata("GitSHA", BuildData.GIT_SHA);
+        // Logger.recordMetadata("GitDate", BuildData.GIT_DATE);
+        // Logger.recordMetadata("GitBranch", BuildData.GIT_BRANCH);
+        // switch (BuildData.DIRTY) {
+        // case 0:
+        //     Logger.recordMetadata("GitDirty", "All changes committed");
+        //     break;
+        // case 1:
+
+        //     Logger.recordMetadata("GitDirty", "Uncomitted changes");
+        //     break;
+        // default:
+        //     Logger.recordMetadata("GitDirty", "Unknown");
+        //     break;
+        // }
 
         robotContainer = new RobotContainer(robotId);
         
diff --git a/src/main/java/frc/robot/subsystems/indexer/Spindexer.java b/src/main/java/frc/robot/subsystems/indexer/Spindexer.java
new file mode 100644 (file)
index 0000000..e5b4276
--- /dev/null
@@ -0,0 +1,39 @@
+package frc.robot.subsystems.indexer;
+
+import com.ctre.phoenix6.hardware.TalonFX;
+
+import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
+import edu.wpi.first.wpilibj2.command.InstantCommand;
+import edu.wpi.first.wpilibj2.command.SubsystemBase;
+
+public class Spindexer extends SubsystemBase {
+    private TalonFX motor;
+
+    public Spindexer(){
+        // TODO: change device id
+        motor = new TalonFX(1);
+
+        // Smartdashboard commands
+        SmartDashboard.putData("Run", new InstantCommand(()-> run()));
+        SmartDashboard.putData("Slow", new InstantCommand(()-> slow()));
+        SmartDashboard.putData("Reverse", new InstantCommand(()-> reverse()));
+        SmartDashboard.putData("Stop", new InstantCommand(()-> stop()));
+        
+    } 
+
+    public void run(){
+        motor.set(1);
+    }
+
+    public void slow(){
+        motor.set(0.6);
+    }
+
+    public void reverse(){
+        motor.set(-1);
+    }
+
+    public void stop(){
+        motor.set(0);
+    }
+}