Skip to content

Commit 305efb8

Browse files
authored
Merge pull request #87 from team4099/remove-climb
climb commented
2 parents e27b9c9 + 1af0406 commit 305efb8

8 files changed

Lines changed: 331 additions & 42 deletions

File tree

src/main/deploy/choreo/IntakeQuadrantL1/IntakeQuadrantClimb.traj

Lines changed: 288 additions & 0 deletions
Large diffs are not rendered by default.

src/main/kotlin/com/team4099/robot2026/Robot.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import com.team4099.robot2026.commands.drivetrain.DrivePathOTF
88
import com.team4099.robot2026.config.ControlBoard
99
import com.team4099.robot2026.config.constants.Constants
1010
import com.team4099.robot2026.subsystems.superstructure.Request
11-
import com.team4099.robot2026.subsystems.superstructure.Superstructure
1211
import com.team4099.robot2026.util.Alert
1312
import com.team4099.robot2026.util.Alert.AlertType
1413
import com.team4099.robot2026.util.CustomLogger
@@ -213,12 +212,13 @@ object Robot : LoggedRobot() {
213212
(DriverStation.getGameSpecificMessage() == "B" &&
214213
(DriverStation.getAlliance().orElse(DriverStation.Alliance.Blue) ==
215214
DriverStation.Alliance.Red))
216-
if (RobotContainer.superstructure.currentState ==
217-
Superstructure.Companion.SuperstructureStates.CLIMB) {
218-
RobotContainer.superstructure.currentRequest = Request.SuperstructureRequest.ExtendClimb()
219-
} else {
220-
RobotContainer.superstructure.currentRequest = Request.SuperstructureRequest.Idle()
221-
}
215+
// if (RobotContainer.superstructure.currentState ==
216+
// Superstructure.Companion.SuperstructureStates.CLIMB) {
217+
// // RobotContainer.superstructure.currentRequest =
218+
// Request.SuperstructureRequest.ExtendClimb()
219+
// } else {
220+
RobotContainer.superstructure.currentRequest = Request.SuperstructureRequest.Idle()
221+
// }
222222
RobotContainer.intake.setBrakeMode(true)
223223
}
224224

src/main/kotlin/com/team4099/robot2026/RobotContainer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ object RobotContainer {
234234
ControlBoard.defenseMode.onTrue(
235235
Commands.runOnce({ superstructure.defenseMode = !superstructure.defenseMode }))
236236

237-
ControlBoard.prepClimb.onTrue(superstructure.requestPrepClimbCommand())
238-
ControlBoard.climb.onTrue(superstructure.requestClimbCommand())
237+
// ControlBoard.prepClimb.onTrue(superstructure.requestPrepClimbCommand())
238+
// ControlBoard.climb.onTrue(superstructure.requestClimbCommand())
239239

240240
ControlBoard.intake.onTrue(
241241
ConditionalCommand(

src/main/kotlin/com/team4099/robot2026/auto/mode/CenterlineSweep.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class CenterlineSweep(
6060
)
6161
.withTimeout(12.0),
6262
superstructure.requestIdleCommand(),
63-
superstructure.requestPrepClimbCommand(),
63+
// superstructure.requestPrepClimbCommand(),
6464
ConditionalCommand(
6565
FollowChoreoPath(drivetrain, climbFlippedTraj),
6666
FollowChoreoPath(drivetrain, climbUnflippedTraj)) {
6767
flipVeritcally
68-
},
69-
superstructure.requestClimbCommand())
68+
})
69+
// superstructure.requestClimbCommand())
7070
}
7171

7272
companion object {

src/main/kotlin/com/team4099/robot2026/auto/mode/PreloadL1Auto.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ class PreloadL1Auto(val drivetrain: Drive, val superstructure: Superstructure) :
2323
superstructure.requestScoreCommand(),
2424
WaitCommand(4.0),
2525
superstructure.requestIdleCommand(),
26-
superstructure.requestPrepClimbCommand(),
26+
// superstructure.requestPrepClimbCommand(),
2727
WaitCommand(2.0),
28-
FollowChoreoPath(drivetrain, secondTrajectory),
29-
superstructure.requestClimbCommand())
28+
FollowChoreoPath(drivetrain, secondTrajectory)
29+
// superstructure.requestClimbCommand())
30+
)
3031
}
3132

3233
companion object {

src/main/kotlin/com/team4099/robot2026/config/ControlBoard.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ object ControlBoard {
4343
val defenseMode = Trigger { operator.bButton && operator.dPadRight }
4444
val unjam = Trigger { operator.bButton && operator.dPadUp }
4545

46-
val climb = Trigger { driver.aButton }
46+
// val climb = Trigger { driver.aButton }
4747
val forceIdle = Trigger { driver.dPadDown || operator.dPadDown }
4848
val leftTrenchOTF = Trigger { driver.leftShoulderButton }
4949
val rightTrenchOTF = Trigger { driver.rightShoulderButton }
@@ -58,7 +58,7 @@ object ControlBoard {
5858
val forceIntakeFullDown = Trigger { operator.leftTriggerAxis > .5 }
5959
val rotateBump = Trigger { operator.leftShoulderButton }
6060

61-
val prepClimb = Trigger { operator.aButton }
61+
// val prepClimb = Trigger { operator.aButton }
6262

6363
val forceHome = Trigger { operator.startButton && operator.selectButton }
6464
}

src/main/kotlin/com/team4099/robot2026/subsystems/superstructure/Request.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ sealed interface Request {
1414

1515
class Unjam : SuperstructureRequest
1616

17-
class ExtendClimb() : SuperstructureRequest
17+
// class ExtendClimb() : SuperstructureRequest
1818

19-
class RetractClimb() : SuperstructureRequest
19+
// class RetractClimb() : SuperstructureRequest
2020

2121
class PrepScore() : SuperstructureRequest
2222

src/main/kotlin/com/team4099/robot2026/subsystems/superstructure/Superstructure.kt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Superstructure(
168168
when (currentRequest) {
169169
is SuperstructureRequest.ForceHome -> SuperstructureStates.FORCE_HOME
170170
is SuperstructureRequest.Unjam -> SuperstructureStates.UNJAM
171-
is SuperstructureRequest.ExtendClimb -> SuperstructureStates.PREP_CLIMB
171+
// is SuperstructureRequest.ExtendClimb -> SuperstructureStates.PREP_CLIMB
172172
is SuperstructureRequest.PrepScore -> SuperstructureStates.PREP_SCORE
173173
is SuperstructureRequest.Score -> SuperstructureStates.SCORE
174174
is SuperstructureRequest.Intake -> SuperstructureStates.INTAKE
@@ -219,7 +219,7 @@ class Superstructure(
219219
when (currentRequest) {
220220
is SuperstructureRequest.Idle -> nextState = SuperstructureStates.IDLE
221221
is SuperstructureRequest.Intake -> nextState = SuperstructureStates.INTAKE
222-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
222+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
223223
is SuperstructureRequest.Score -> {
224224
if (shooter.isAtTargetedVelocity) {
225225
nextState = SuperstructureStates.SCORE
@@ -243,7 +243,7 @@ class Superstructure(
243243
when (currentRequest) {
244244
is SuperstructureRequest.Idle -> nextState = SuperstructureStates.IDLE
245245
is SuperstructureRequest.Intake -> nextState = SuperstructureStates.IDLE
246-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
246+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
247247
else -> {}
248248
}
249249
}
@@ -262,7 +262,7 @@ class Superstructure(
262262

263263
when (currentRequest) {
264264
is SuperstructureRequest.Idle -> nextState = SuperstructureStates.IDLE
265-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
265+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
266266
else -> {}
267267
}
268268
}
@@ -282,7 +282,7 @@ class Superstructure(
282282
is SuperstructureRequest.PrepScore -> nextState = SuperstructureStates.PREP_SCORE
283283
is SuperstructureRequest.Score -> nextState = SuperstructureStates.SCORE
284284
is SuperstructureRequest.Eject -> nextState = SuperstructureStates.EJECT
285-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
285+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
286286
else -> {}
287287
}
288288
}
@@ -301,11 +301,11 @@ class Superstructure(
301301
is SuperstructureRequest.Idle -> {
302302
nextState = SuperstructureStates.IDLE
303303
}
304-
is SuperstructureRequest.RetractClimb -> {
305-
if (climb.isAtTargetedPosition) {
306-
nextState = SuperstructureStates.CLIMB
307-
}
308-
}
304+
// is SuperstructureRequest.RetractClimb -> {
305+
// if (climb.isAtTargetedPosition) {
306+
// nextState = SuperstructureStates.CLIMB
307+
// }
308+
// }
309309
else -> {}
310310
}
311311
}
@@ -315,7 +315,7 @@ class Superstructure(
315315
Request.IntakeRequest.TargetingPosition(IntakeConstants.ANGLES.CLIMB_ANGLE)
316316

317317
when (currentRequest) {
318-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
318+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
319319
else -> {}
320320
}
321321
}
@@ -328,7 +328,7 @@ class Superstructure(
328328
when (currentRequest) {
329329
is SuperstructureRequest.Idle -> nextState = SuperstructureStates.IDLE
330330
is SuperstructureRequest.Intake -> nextState = SuperstructureStates.INTAKE
331-
is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
331+
// is SuperstructureRequest.ExtendClimb -> nextState = SuperstructureStates.PREP_CLIMB
332332
else -> {}
333333
}
334334
}
@@ -378,17 +378,17 @@ class Superstructure(
378378
return returnCommand
379379
}
380380

381-
fun requestPrepClimbCommand(): Command {
382-
val returnCommand = runOnce { currentRequest = SuperstructureRequest.ExtendClimb() }
383-
returnCommand.name = "RequestPrepClimbCommand"
384-
return returnCommand
385-
}
386-
387-
fun requestClimbCommand(): Command {
388-
val returnCommand = runOnce { currentRequest = SuperstructureRequest.RetractClimb() }
389-
returnCommand.name = "RequestClimbCommand"
390-
return returnCommand
391-
}
381+
// fun requestPrepClimbCommand(): Command {
382+
// val returnCommand = runOnce { currentRequest = SuperstructureRequest.ExtendClimb() }
383+
// returnCommand.name = "RequestPrepClimbCommand"
384+
// return returnCommand
385+
// }
386+
//
387+
// fun requestClimbCommand(): Command {
388+
// val returnCommand = runOnce { currentRequest = SuperstructureRequest.RetractClimb() }
389+
// returnCommand.name = "RequestClimbCommand"
390+
// return returnCommand
391+
// }
392392

393393
fun requestForceIntakeCommand(wantedAngle: Angle): Command {
394394
val returnCommand = runOnce {

0 commit comments

Comments
 (0)