Skip to content

Commit

Permalink
auton
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Apr 7, 2024
1 parent 30390e2 commit 4d4b432
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 20 deletions.
32 changes: 25 additions & 7 deletions src/main/deploy/pathplanner/paths/Center Note to Bottom Note.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,38 @@
},
{
"anchor": {
"x": 2.46,
"y": 4.1
"x": 2.5108064630543674,
"y": 4.363499898170968
},
"prevControl": {
"x": 1.9056323243179971,
"y": 4.433205506592626
"x": 1.9564387873723645,
"y": 4.696705404763594
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"rotationTargets": [
{
"waypointRelativePos": 0.5,
"rotationDegrees": 155.51092067617856,
"rotateFast": false
}
],
"constraintZones": [
{
"name": "New Constraints Zone",
"minWaypointRelativePos": 0.7,
"maxWaypointRelativePos": 1.0,
"constraints": {
"maxVelocity": 2.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 450.0,
"maxAngularAcceleration": 360.0
}
}
],
"eventMarkers": [
{
"name": "New Event Marker",
Expand Down Expand Up @@ -57,7 +75,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 180.0,
"rotation": 149.03624346792648,
"rotateFast": false
},
"reversed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,38 @@
},
{
"anchor": {
"x": 2.630987604317551,
"y": 6.702409801216
"x": 2.5940087916211865,
"y": 6.609962769475088
},
"prevControl": {
"x": 2.513711941194796,
"y": 6.541155764422212
"x": 2.4767331284984317,
"y": 6.4487087326813
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"rotationTargets": [
{
"waypointRelativePos": 0.25,
"rotationDegrees": -138.53060388443157,
"rotateFast": false
}
],
"constraintZones": [
{
"name": "New Constraints Zone",
"minWaypointRelativePos": 0.65,
"maxWaypointRelativePos": 1.0,
"constraints": {
"maxVelocity": 2.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 450.0,
"maxAngularAcceleration": 360.0
}
}
],
"eventMarkers": [
{
"name": "New Event Marker",
Expand Down
22 changes: 17 additions & 5 deletions src/main/deploy/pathplanner/paths/Top Note to Center Note.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 2.63,
"y": 6.7
"x": 2.59,
"y": 6.61
},
"prevControl": null,
"nextControl": {
"x": 1.9674537249975397,
"y": 6.652016786916457
"x": 1.9274537249975396,
"y": 6.562016786916457
},
"isLocked": false,
"linkedName": null
Expand All @@ -29,7 +29,19 @@
}
],
"rotationTargets": [],
"constraintZones": [],
"constraintZones": [
{
"name": "New Constraints Zone",
"minWaypointRelativePos": 0.7,
"maxWaypointRelativePos": 1.0,
"constraints": {
"maxVelocity": 2.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 450.0,
"maxAngularAcceleration": 360.0
}
}
],
"eventMarkers": [
{
"name": "New Event Marker",
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class IntakeSubsystem extends SubsystemBase {
private boolean _hasNote = false;
private boolean _hasNoteAuton = false;

private final Debouncer _feedDebouncer = new Debouncer(0.08, DebounceType.kRising);
private final Debouncer _feedDebouncer = new Debouncer(0.1, DebounceType.kRising);

/** How to feed (in or out). */
public enum FeedMode {
Expand Down Expand Up @@ -167,7 +167,7 @@ public void feed(FeedMode feedMode) {

@Override
public void periodic() {
boolean stalling = _feedDebouncer.calculate(_feedMotor.getOutputCurrent() > 55);
boolean stalling = _feedDebouncer.calculate(_feedMotor.getOutputCurrent() > 60);
_hasNote = stalling ? true : _hasNote;

// This method will be called once per scheduler run
Expand Down

0 comments on commit 4d4b432

Please sign in to comment.