forked from Team100/main2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
14 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 0 additions & 126 deletions
126
swerve100/src/main/java/org/team100/frc2023/subsystems/arm/Arm.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 10 additions & 40 deletions
50
swerve100/src/main/java/org/team100/frc2023/subsystems/arm/ArmSegment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,37 @@ | ||
package org.team100.frc2023.subsystems.arm; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.team100.lib.motors.FRCNEO; | ||
|
||
import edu.wpi.first.util.sendable.SendableBuilder; | ||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | ||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
|
||
public class ArmSegment extends SubsystemBase{ | ||
// TODO: remove this class | ||
public class ArmSegment extends SubsystemBase { | ||
|
||
private FRCNEO motor; | ||
private Supplier<Double> positionSupplier; | ||
|
||
|
||
/** Creates a new UpperArm. */ | ||
public ArmSegment(Supplier<Double> positionSupplier, FRCNEO motor, String name) { | ||
public ArmSegment(FRCNEO motor, String name) { | ||
this.motor = motor; | ||
this.positionSupplier = positionSupplier; | ||
|
||
SmartDashboard.putData(name, this); | ||
|
||
|
||
} | ||
|
||
/** | ||
* Sets the motor output, accounting for soft limits. | ||
* <p><b>THIS SHOULD BE THE ONLY PLACE WHERE MOTOR OUTPUT IS SET.</b></p> | ||
* @param x | ||
*/ | ||
public void setMotor(double x) { | ||
// Account for soft limits | ||
// kGravityGain *= Math.sin(positionSupplier.get()); | ||
// if (getAngle() <= lowerSoftLimit && x < 0) | ||
// this.motor.motor.set(0); | ||
// else if (getAngle() >= upperSoftLimit && x > 0) | ||
// this.motor.motor.set(0); | ||
// else | ||
this.motor.motor.set(x) ; | ||
} | ||
|
||
@Override | ||
public void periodic() { | ||
|
||
} | ||
|
||
|
||
public double getDegrees() { | ||
return positionSupplier.get() * 180/Math.PI; | ||
this.motor.motor.set(x); | ||
} | ||
|
||
public void initSendable(SendableBuilder builder) { | ||
super.initSendable(builder); | ||
// builder.addDoubleProperty("Error", () -> m_controller.getPositionError(), null); | ||
// builder.addDoubleProperty("Error", () -> m_controller.getPositionError(), | ||
// null); | ||
// builder.addDoubleProperty("Measurement", () -> getMeasurement(), null); | ||
// builder.addDoubleProperty("Setpoint", () -> m_controller.getSetpoint().position, null); | ||
// builder.addDoubleProperty("Goal", () -> m_controller.getGoal().position, null); | ||
// builder.addDoubleProperty("Setpoint", () -> | ||
// m_controller.getSetpoint().position, null); | ||
// builder.addDoubleProperty("Goal", () -> m_controller.getGoal().position, | ||
// null); | ||
// builder.addDoubleProperty("Output", () -> output, null); | ||
// builder.addDoubleProperty("Degrees", () -> getDegrees(), null); | ||
|
||
|
||
|
||
|
||
} | ||
} |
31 changes: 0 additions & 31 deletions
31
swerve100/src/main/java/org/team100/frc2023/subsystems/arm/LowerArm.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
swerve100/src/main/java/org/team100/frc2023/subsystems/arm/UpperArm.java
This file was deleted.
Oops, something went wrong.