Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #30 from OakvilleDynamics/StlFrc2023Changes
Browse files Browse the repository at this point in the history
Spotless, constant tweaks
  • Loading branch information
Mamapama authored Mar 30, 2023
2 parents 24ebd4e + 72396cf commit 6ed91a5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 148 deletions.
14 changes: 7 additions & 7 deletions src/main/deploy/pathplanner/Blue April ID 6.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
{
"anchorPoint": {
"x": 2.2722777360448347,
"y": 4.640616302509201
"y": 4.6
},
"prevControl": null,
"nextControl": {
"x": 3.323520788811873,
"y": 4.640616302509201
"x": 3.4713134579874785,
"y": 4.6
},
"holonomicAngle": 0,
"isReversal": false,
Expand All @@ -24,12 +24,12 @@
},
{
"anchorPoint": {
"x": 6.152486773058653,
"y": 4.612189862677599
"x": 4.375834283583461,
"y": 4.6
},
"prevControl": {
"x": 4.880403590594416,
"y": 4.612189862677599
"x": 3.103751101119224,
"y": 4.6
},
"nextControl": null,
"holonomicAngle": 0,
Expand Down
145 changes: 8 additions & 137 deletions src/main/deploy/pathplanner/Blue April ID 7.path
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"waypoints": [
{
"anchorPoint": {
"x": 2.4073033252449494,
"y": 2.7573646636654985
"x": 2.23432929246438,
"y": 2.7646751926236828
},
"prevControl": null,
"nextControl": {
"x": 2.314497384778828,
"y": 2.7573646636654985
"x": 2.3271352329305013,
"y": 2.7646751926236828
},
"holonomicAngle": 0,
"isReversal": false,
Expand All @@ -24,141 +24,12 @@
},
{
"anchorPoint": {
"x": 2.0377596074341096,
"y": 2.7644712736234
"x": 5.763921942879126,
"y": 3.1143962992702807
},
"prevControl": {
"x": 2.265171126086934,
"y": 2.7644712736234
},
"nextControl": {
"x": 1.8382675594375457,
"y": 2.7644712736234
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": true,
"stopEvent": {
"names": [
"PlaceObject"
],
"executionBehavior": "sequential",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.9074449816756784,
"y": 2.7666461500780146
},
"prevControl": {
"x": 3.4732948189300643,
"y": 2.7644712736234
},
"nextControl": {
"x": 4.907432434352697,
"y": 2.771655590019217
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": true,
"stopEvent": {
"names": [],
"executionBehavior": "sequential",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 5.534136579701731,
"y": 2.764785233499039
},
"prevControl": {
"x": 3.6491602930461453,
"y": 2.766172914994791
},
"nextControl": {
"x": 5.960608304195333,
"y": 2.7644712736234
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 6.372791681753577,
"y": 3.006096012192025
},
"prevControl": {
"x": 6.292344208388287,
"y": 2.9706657778083483
},
"nextControl": {
"x": 9.115943125503273,
"y": 4.2142197050351555
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": true,
"stopEvent": {
"names": [
"PickUpObject"
],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 6.657056080069608,
"y": 2.7431514437496967
},
"prevControl": {
"x": 7.794469765254116,
"y": 2.7553905489421924
},
"nextControl": {
"x": 5.519642394885094,
"y": 2.730912338557201
},
"holonomicAngle": 0,
"isReversal": false,
"velOverride": null,
"isLocked": false,
"isStopPoint": false,
"stopEvent": {
"names": [],
"executionBehavior": "parallel",
"waitBehavior": "none",
"waitTime": 0
}
},
{
"anchorPoint": {
"x": 3.9636509060252174,
"y": 2.7360448337917966
},
"prevControl": {
"x": 4.780911051183807,
"y": 2.7502580537075985
"x": 5.012669195267914,
"y": 2.5962909560901344
},
"nextControl": null,
"holonomicAngle": 0,
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class Constants {
public static final int joystickButtonBackJackOn = 8;
public static final int joystickButtonFrontJackOff = 2;
public static final int joystickButtonBackJackOff = 10;
// JACKS AND CLAW ARE SWITCHED IN SOLENOIDS, I HAVE SWAPPED THE JOYSTICK CONTROLS
// JACKS AND CLAW ARE SWITCHED IN SOLENOIDS, I HAVE SWAPPED THE JOYSTICK CONTROLS
// TO BE THE CORRECT BUTTONS (TEMPORARY CHANGE)

// Constants for claw button assignments
Expand Down Expand Up @@ -76,7 +76,7 @@ public final class Constants {
public static final double motorFeedAccelerationGain = 0.0;

// PIDController Coefficients, left and right value are usually the same
public static final double pidControllerProportionalCoefficient = 0.0;
public static final double pidControllerProportionalCoefficient = 1.0;
public static final double pidControllerIntegralCoefficient = 0.0;
public static final double pidControllerDerivativeCoefficient = 0.0;

Expand Down Expand Up @@ -156,7 +156,8 @@ public static enum AutoPathChoice {
Red3,
Blue6,
Blue7,
Blue8, EmergencyPCharge
Blue8,
EmergencyPCharge
}

public static final String PlaceObjectMarker = "PlaceObject";
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/commands/Jacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public void execute() {
m_Jacks.frontOff();
System.out.println("Jacks - front Off");
}
// solenoids for jacks and claw are swapped, so we changed the controls for jacks and claw (constants)
// solenoids for jacks and claw are swapped, so we changed the controls for jacks and claw
// (constants)

if (controllerJoystick.getRawButton(Constants.joystickButtonBackJackOn) == true) {
m_Jacks.backOn();
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMax.ControlType;
import com.revrobotics.CANSparkMax.IdleMode;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.SparkMaxPIDController;
Expand Down Expand Up @@ -47,6 +48,9 @@ public Arm() {
topArm.setInverted(Constants.topArmInverted);
retractArm();

bottomArm.setIdleMode(IdleMode.kBrake);
topArm.setIdleMode(IdleMode.kBrake);

System.out.println("Arm is retracted");

m_bottomEncoder = bottomArm.getEncoder(Type.kQuadrature, 8192);
Expand Down Expand Up @@ -80,6 +84,7 @@ public void bottomArmUp() {
// Check for if the top arm has cleared the superstructure before allowing the bottom arm
// to move
// if (m_topEncoder.getPosition() > Constants.topArmThreshold) {

bottomArm.set(Constants.bottomArmSpeed);
// }
}
Expand Down

0 comments on commit 6ed91a5

Please sign in to comment.