Skip to content
Merged
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
21 changes: 12 additions & 9 deletions simgui-ds.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
}
],
"axisCount": 5,
"buttonCount": 4,
"buttonCount": 6,
"buttonKeys": [
90,
88,
67,
86
86,
66,
78
],
"povConfig": [
{
Expand Down Expand Up @@ -55,12 +57,14 @@
}
],
"axisCount": 2,
"buttonCount": 4,
"buttonCount": 6,
"buttonKeys": [
77,
44,
46,
47
49,
50,
51,
52,
53,
54
],
"povCount": 0
},
Expand Down Expand Up @@ -95,8 +99,7 @@
],
"robotJoysticks": [
{
"guid": "78696e70757401000000000000000000",
"useGamepad": true
"guid": "Keyboard0"
},
{
"guid": "Keyboard1"
Expand Down
26 changes: 23 additions & 3 deletions simgui-window.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Docking": {
"Data": [
"DockNode ID=0x00000001 Pos=9,835 Size=937,509 Selected=0x48913727"
"DockNode ID=0x00000001 Pos=9,835 Size=937,509 Selected=0x2D9B9756"
]
},
"MainWindow": {
Expand Down Expand Up @@ -51,6 +51,21 @@
"Pos": "1002,1036",
"Size": "340,360"
},
"###/SmartDashboard/Sim/LeftView": {
"Collapsed": "0",
"Pos": "1366,653",
"Size": "393,372"
},
"###/SmartDashboard/Sim/TopView": {
"Collapsed": "0",
"Pos": "998,654",
"Size": "361,374"
},
"###/SmartDashboard/States": {
"Collapsed": "0",
"Pos": "247,711",
"Size": "300,150"
},
"###/SmartDashboard/TopView": {
"Collapsed": "0",
"Pos": "998,652",
Expand All @@ -64,18 +79,23 @@
"###FMS": {
"Collapsed": "0",
"Pos": "268,27",
"Size": "210,214"
"Size": "202,214"
},
"###Joysticks": {
"Collapsed": "0",
"Pos": "11,442",
"Size": "976,278"
"Size": "976,219"
},
"###Keyboard 0 Settings": {
"Collapsed": "0",
"Pos": "266,326",
"Size": "300,560"
},
"###Keyboard 1 Settings": {
"Collapsed": "0",
"Pos": "320,50",
"Size": "300,560"
},
"###NetworkTables": {
"Collapsed": "0",
"DockId": "0x00000001,0",
Expand Down
12 changes: 9 additions & 3 deletions simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
"visible": true
}
},
"/SmartDashboard/LeftView": {
"/SmartDashboard/Scheduler": {
"window": {
"visible": true
}
},
"/SmartDashboard/Scheduler": {
"/SmartDashboard/Sim/LeftView": {
"window": {
"visible": true
}
},
"/SmartDashboard/TopView": {
"/SmartDashboard/Sim/TopView": {
"window": {
"visible": true
}
Expand Down Expand Up @@ -89,6 +89,9 @@
}
},
"NetworkTables": {
"Retained Values": {
"open": false
},
"transitory": {
"Robot": {
"FieldSimulation": {
Expand All @@ -106,6 +109,9 @@
}
},
"NetworkTables Info": {
"Clients": {
"open": true
},
"visible": true
}
}
2 changes: 1 addition & 1 deletion src/main/java/frc/rebuilt/ShotCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ShootingParameters getParameters() {
}

// Target location on the field
boolean feed = RobotStates.robotInFeedZone.getAsBoolean();
boolean feed = RobotStates.robotInFeedZone.getAsBoolean() && !RobotStates.forceScore.getAsBoolean();
Translation2d target = feed ? FeedTargetFactory.generate() : HubTargetFactory.generate().toTranslation2d();

// Calculate estimated pose while accounting for phase delay
Expand Down
45 changes: 37 additions & 8 deletions src/main/java/frc/robot/Coordinator.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package frc.robot;

import org.checkerframework.checker.units.qual.C;

import edu.wpi.first.networktables.NTSendableBuilder;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import frc.robot.fuelIntake.FuelIntakeStates;
import frc.robot.indexer.IndexerStates;
import frc.robot.intakeExtension.IntakeExtensionStates;
import frc.robot.launcher.LauncherStates;
import frc.robot.swerve.SwerveStates;
import frc.robot.turretRotationalPivot.RotationalPivotStates;

public class Coordinator {
Expand All @@ -17,44 +22,68 @@ public void applyRobotState(State state) {
FuelIntakeStates.stop();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
LauncherStates.neutral();
RotationalPivotStates.neutral();
}
case INTAKE_FUEL -> {
FuelIntakeStates.intakeFuel();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
LauncherStates.neutral();
RotationalPivotStates.neutral();
}
case TURRET_TRACK_WITH_SPINUP -> {
case SNAKE_INTAKE -> {
FuelIntakeStates.intakeFuel();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
RotationalPivotStates.neutral();
}
case TURRET_TRACK -> {
FuelIntakeStates.stop();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
LauncherStates.aimAtHub();
RotationalPivotStates.aimAtHub();
}
case TURRET_TRACK_WITH_LAUNCH -> {
FuelIntakeStates.stop();
IndexerStates.indexMax();
IntakeExtensionStates.fullExtend();
LauncherStates.aimAtHub();
RotationalPivotStates.aimAtHub();
}
case TURRET_FEED_WITH_SPINUP -> {
case TURRET_WITHOUT_TRACK -> {
FuelIntakeStates.stop();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
RotationalPivotStates.aimAtPresetPosition();
}
case TURRET_WITHOUT_TRACK_WITH_LAUNCH -> {
FuelIntakeStates.stop();
IndexerStates.indexMax();
IntakeExtensionStates.fullExtend();
RotationalPivotStates.aimAtPresetPosition();
}
case TURRET_FEED_WITH_AIMING -> {
FuelIntakeStates.stop();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
LauncherStates.aimAtHub();
RotationalPivotStates.aimAtHub();
}
case TURRET_FEED_WITH_LAUNCH -> {
FuelIntakeStates.stop();
IndexerStates.indexMax();
IntakeExtensionStates.fullExtend();
LauncherStates.aimAtHub();
RotationalPivotStates.aimAtHub();
}
case TURRET_FEED_WITHOUT_AIMING -> {
FuelIntakeStates.stop();
IndexerStates.neutral();
IntakeExtensionStates.fullExtend();
RotationalPivotStates.aimAtPresetPosition();
}
case TURRET_FEED_WITHOUT_AIMING_WITH_LAUNCH -> {
FuelIntakeStates.stop();
IndexerStates.indexMax();
IntakeExtensionStates.fullExtend();
RotationalPivotStates.aimAtPresetPosition();
}
case L1_CLIMB_PREP -> {

}
Expand Down
Loading