]> git.taranathan.com Git - FRC2026.git/commitdiff
added functions for operator
authorWesley28w <wesleycwong@gmail.com>
Fri, 3 Apr 2026 12:57:01 +0000 (05:57 -0700)
committerWesley28w <wesleycwong@gmail.com>
Fri, 3 Apr 2026 12:57:01 +0000 (05:57 -0700)
src/main/deploy/elastic-layout.json
src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/constants/Constants.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/Intake/IntakeIO.java
src/main/java/frc/robot/subsystems/shooter/Shooter.java
src/main/java/frc/robot/util/HubActive.java

index 7811b8ea663e74e0d3165b1132ca810eab25e703..82fce05e602834155b4044ef8f9070e2a0ed3af0 100644 (file)
@@ -8,11 +8,11 @@
         "layouts": [],
         "containers": [
           {
-            "title": "WON AUTO?",
-            "x": 1280.0,
-            "y": 256.0,
-            "width": 384.0,
-            "height": 256.0,
+            "title": "Autos Result",
+            "x": 1408.0,
+            "y": 512.0,
+            "width": 256.0,
+            "height": 128.0,
             "type": "Large Text Display",
             "properties": {
               "topic": "/SmartDashboard/WON AUTO?",
               "data_type": "string"
             }
           },
-          {
-            "title": "Turret position",
-            "x": 1024.0,
-            "y": 0.0,
-            "width": 384.0,
-            "height": 256.0,
-            "type": "Graph",
-            "properties": {
-              "topic": "/SmartDashboard/Turret position",
-              "period": 0.033,
-              "data_type": "double",
-              "time_displayed": 5.0,
-              "color": 4278238420,
-              "line_width": 2.0
-            }
-          },
-          {
-            "title": "Target Velocity RPS",
-            "x": 768.0,
-            "y": 128.0,
-            "width": 256.0,
-            "height": 128.0,
-            "type": "Number Bar",
-            "properties": {
-              "topic": "/SmartDashboard/Target Velocity RPS",
-              "period": 0.06,
-              "data_type": "double",
-              "min_value": -60.0,
-              "max_value": 0.0,
-              "divisions": 5,
-              "inverted": true,
-              "orientation": "horizontal"
-            }
-          },
-          {
-            "title": "Intake Calibrated",
-            "x": 256.0,
-            "y": 0.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Intake Calibrated",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Hood Calibrated",
-            "x": 128.0,
-            "y": 0.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Hood Calibrated",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Turret Calibrated",
-            "x": 0.0,
-            "y": 0.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Turret Calibrated",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Climb Calibrated",
-            "x": 384.0,
-            "y": 0.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Climb Calibrated",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
           {
             "title": "Field",
             "x": 0.0,
-            "y": 128.0,
-            "width": 768.0,
-            "height": 384.0,
+            "y": 0.0,
+            "width": 512.0,
+            "height": 512.0,
             "type": "Field",
             "properties": {
               "topic": "/SmartDashboard/Field",
             }
           },
           {
-            "title": "Hood At Setpoint",
-            "x": 128.0,
-            "y": 512.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Hood At Setpoint",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Turret At Setpoint",
+            "title": "Voltage",
             "x": 0.0,
             "y": 512.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Turret At Setpoint",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Intake At Setpoint",
-            "x": 256.0,
-            "y": 512.0,
-            "width": 128.0,
-            "height": 128.0,
-            "type": "Boolean Box",
-            "properties": {
-              "topic": "/SmartDashboard/Intake At Setpoint",
-              "period": 0.06,
-              "data_type": "boolean",
-              "true_color": 4283215696,
-              "false_color": 4294198070,
-              "true_icon": "None",
-              "false_icon": "None"
-            }
-          },
-          {
-            "title": "Voltage",
-            "x": 512.0,
-            "y": 0.0,
             "width": 512.0,
             "height": 128.0,
             "type": "Voltage View",
               "data_type": "double",
               "min_value": 4.0,
               "max_value": 13.0,
-              "divisions": 5,
+              "divisions": 10,
               "inverted": false,
               "orientation": "horizontal"
             }
           },
           {
             "title": "RobotID",
-            "x": 1408.0,
-            "y": 0.0,
+            "x": 0.0,
+            "y": 768.0,
             "width": 256.0,
             "height": 128.0,
-            "type": "Text Display",
+            "type": "Large Text Display",
             "properties": {
               "topic": "/SmartDashboard/RobotID",
               "period": 0.06,
-              "data_type": "string",
-              "show_submit_button": false
+              "data_type": "string"
             }
           },
           {
-            "title": "OPERATOR: Shooter Power Modifier",
-            "x": 1408.0,
-            "y": 128.0,
-            "width": 256.0,
-            "height": 128.0,
-            "type": "Text Display",
+            "title": "Time till Unactive",
+            "x": 1280.0,
+            "y": 0.0,
+            "width": 384.0,
+            "height": 256.0,
+            "type": "Radial Gauge",
             "properties": {
-              "topic": "/SmartDashboard/OPERATOR: Shooter Power Modifier",
+              "topic": "/SmartDashboard/Time till Unactive",
               "period": 0.06,
               "data_type": "double",
-              "show_submit_button": false
+              "start_angle": -120.0,
+              "end_angle": 120.0,
+              "min_value": 0.0,
+              "max_value": 100.0,
+              "number_of_labels": 6,
+              "wrap_value": false,
+              "show_pointer": true,
+              "show_ticks": true
             }
           },
           {
-            "title": "Auto chooser",
+            "title": "Time till active",
             "x": 1280.0,
-            "y": 512.0,
+            "y": 256.0,
             "width": 384.0,
-            "height": 128.0,
-            "type": "ComboBox Chooser",
+            "height": 256.0,
+            "type": "Radial Gauge",
             "properties": {
-              "topic": "/SmartDashboard/Auto chooser",
+              "topic": "/SmartDashboard/Time till active",
               "period": 0.06,
-              "sort_options": false
+              "data_type": "double",
+              "start_angle": -120.0,
+              "end_angle": 120.0,
+              "min_value": 0.0,
+              "max_value": 30.0,
+              "number_of_labels": 6,
+              "wrap_value": false,
+              "show_pointer": true,
+              "show_ticks": false
             }
           },
           {
-            "title": "Match Time",
-            "x": 768.0,
-            "y": 256.0,
-            "width": 512.0,
-            "height": 384.0,
-            "type": "Match Time",
+            "title": "Hub Active",
+            "x": 1280.0,
+            "y": 512.0,
+            "width": 128.0,
+            "height": 128.0,
+            "type": "Boolean Box",
             "properties": {
-              "topic": "/SmartDashboard/Match Time",
+              "topic": "/SmartDashboard/Hub Active",
               "period": 0.06,
-              "data_type": "double",
-              "time_display_mode": "Minutes and Seconds",
-              "red_start_time": 20,
-              "yellow_start_time": 30
+              "data_type": "boolean",
+              "true_color": 4283215696,
+              "false_color": 4294198070,
+              "true_icon": "None",
+              "false_icon": "None"
             }
           },
           {
-            "title": "Phase Countdown",
+            "title": "Auto chooser",
             "x": 0.0,
             "y": 640.0,
-            "width": 384.0,
-            "height": 256.0,
-            "type": "Match Time",
+            "width": 512.0,
+            "height": 128.0,
+            "type": "ComboBox Chooser",
             "properties": {
-              "topic": "/SmartDashboard/Phase Countdown",
+              "topic": "/SmartDashboard/Auto chooser",
               "period": 0.06,
-              "data_type": "double",
-              "time_display_mode": "Minutes and Seconds",
-              "red_start_time": 20,
-              "yellow_start_time": 30
+              "sort_options": true
             }
           },
           {
-            "title": "Current Phase",
-            "x": 384.0,
-            "y": 512.0,
+            "title": "Spindexer Jamming",
+            "x": 1280.0,
+            "y": 768.0,
             "width": 384.0,
             "height": 128.0,
-            "type": "Large Text Display",
+            "type": "Boolean Box",
             "properties": {
-              "topic": "/SmartDashboard/Current Phase",
+              "topic": "/SmartDashboard/Spindexer Jamming",
               "period": 0.06,
-              "data_type": "string"
+              "data_type": "boolean",
+              "true_color": 4283215696,
+              "false_color": 4294198070,
+              "true_icon": "None",
+              "false_icon": "None"
             }
           }
         ]
index 3b3fe90122120c4ee7e8da7ddb15e4b74cc68a3f..9da140f60bcf9297ef8bf70ae835e6f61fa91d62 100644 (file)
@@ -209,6 +209,25 @@ public class Superstructure extends Command {
         //spindexer.stopSpindexer();
     }
 
+    // shoot higher
+    public void bumpUpHoodOffset() {
+        hoodOffset += 1.0; // 1 degree
+    }
+
+    // shoot lower
+    public void bumpDownHoodOffset() {
+        hoodOffset -= 1.0; // 1 degree
+    }
+
+    // aim more left
+    public void bumpUpTurretOffset() {
+        turretOffset += 2.5; // 2.5 degree
+    }
+    // aim more right
+    public void bumpDownTurretOffset() {
+        turretOffset -= 2.5shoo; // 2.5 degree
+    }
+
     @Override
     public void execute() {
         TOFAdjustment = SmartDashboard.getNumber("OPERATOR: TOF Adjustment", TOFAdjustment);
index cfa252c09611af1749669873cbdf50640b88b5af..3c1e2dd8e940d563790d22e5866916c232eb1fc1 100644 (file)
@@ -21,7 +21,7 @@ public class Constants {
     public static final boolean USE_TELEMETRY = true;
 
     // this would disable all logger calls
-    public static final boolean DISABLE_LOGGING = true;
+    public static final boolean DISABLE_LOGGING = false;
 
     public static enum Mode {
         /** Running on a real robot. */
index 36453feb8e88c21f5538759e45edccd8d56f5248..f9f6caa7a29919c2da4c7c18839e47813816c2fe 100644 (file)
@@ -139,6 +139,7 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
             controller.get(PS5Button.SQUARE).toggleOnTrue(autoShoot);
         }
 
+    
         // Hood
         if (hood != null) {
             // Set the hood down -- for safety measures under trench
index 09bd90ecae3239f039b23b63e7cd2c4a81944752..15dc34b7001ea76932a5d1aad1444937fbaa1dda 100644 (file)
@@ -4,7 +4,7 @@ import org.littletonrobotics.junction.AutoLog;
 
 public interface IntakeIO {
     @AutoLog
-    public static class IntakeIOInputs{
+    public static class IntakeIOInputs {
         public double leftPosition = 0.0;
         public double rightPosition = 0.0;
         public double leftCurrent = 0.0;
index 882ffc86f7867ae107adda1ff3148b7bd13456b4..0e21a819b00201f147e6eb4e747cbfd6a6f4d2ed 100644 (file)
@@ -141,6 +141,14 @@ public class Shooter extends SubsystemBase implements ShooterIO {
         }
     }
 
+    public void bumpUpShooterModifier() {
+        powerModifier += 0.025;
+    }
+
+    public void bumpDownShooterModifier() {
+        powerModifier -= 0.025;
+    }
+
     /**
      * @return Whether the shooter is at the target speed with tolerance of 1 m/s
      */
index e6d7ade23f1fe9a51d14b47af01d28d2dd71d7b6..5a5b80c8cc41231d75134e6a1accf928bbf4208b 100644 (file)
@@ -42,13 +42,11 @@ public class HubActive {
       }
     }
 
-
     // Shift was is active for blue if red won auto, or red if blue won auto.
     boolean shift1Active = switch (alliance.get()) {
       case Red -> !redInactiveFirst;
       case Blue -> redInactiveFirst;
     };
-    SmartDashboard.putNumber("Time till active", timeToActive().orElse(timeToInactive().orElse(0.0)));
     if (matchTime > 130) {
       // Transition shift, hub is active.
       return true;