no worky
This commit is contained in:
parent
626b92b769
commit
ba7e8d59ad
@ -35,7 +35,7 @@ public Robot() {
|
||||
|
||||
if (isReal()) {
|
||||
Logger.addDataReceiver(new WPILOGWriter()); // Log to a USB stick ("/U/logs")
|
||||
//Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
|
||||
Logger.addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
|
||||
new PowerDistribution(1, ModuleType.kRev); // Enables power distribution logging
|
||||
} else {
|
||||
setUseTiming(false); // Run as fast as possible
|
||||
|
@ -35,9 +35,9 @@ public class ElevatorConstants {
|
||||
public static final double kMaintainP = 3;
|
||||
*/
|
||||
|
||||
public static final double kP = 5.6;//7; //
|
||||
public static final double kP = 3;//7; //
|
||||
public static final double kI = 0;
|
||||
public static final double kD = 0.28;//0.28
|
||||
public static final double kD = 0;//.28;//0.28
|
||||
|
||||
public static final double kAllowedError = 1;
|
||||
|
||||
|
@ -144,7 +144,7 @@ public class Elevator extends SubsystemBase {
|
||||
},
|
||||
() -> {
|
||||
controller.setReference(
|
||||
setpoint.position,
|
||||
encoder.getPosition(),
|
||||
ControlType.kPosition,
|
||||
ClosedLoopSlot.kSlot0,
|
||||
feedForward.calculate(0.0)
|
||||
@ -169,7 +169,7 @@ public class Elevator extends SubsystemBase {
|
||||
* @return Sets motor voltage to achieve the target destination
|
||||
*/
|
||||
public Command goToSetpoint(DoubleSupplier setGoal) {
|
||||
|
||||
|
||||
return startRun(() -> {
|
||||
goal = new TrapezoidProfile.State(setGoal.getAsDouble(), 0.0);
|
||||
}, () -> {
|
||||
|
Loading…
Reference in New Issue
Block a user