Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use WPILib 2020.1.2 #151

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle5k/gradle5k.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def versions = [

// Core FRC libraries
// Using a "+" here will allow you to use beta versions of libraries
wpilib: "2021.1.1-alpha-1" // See: https://github.com/wpilibsuite/allwpilib/releases
wpilib: "2021.1.2" // See: https://github.com/wpilibsuite/allwpilib/releases
// ctre "5.+" // See: http://devsite.ctr-electronics.com/maven/release/com/ctre/phoenix/wpiapi-java/
// navx "3.+" // See: https://www.kauailabs.com/dist/frc/2020/navx_frc.json (Check ["javaDependencies"][0]["version"])
// rev_color "1.+" // See: https://github.com/REVrobotics/Color-Sensor-v3/releases
Expand Down Expand Up @@ -139,4 +139,4 @@ tasks.withType(Test) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import edu.wpi.first.wpilibj.geometry.Pose2d;
import edu.wpi.first.wpilibj.geometry.Rotation2d;
import edu.wpi.first.wpilibj.geometry.Translation2d;
import edu.wpi.first.wpilibj.simulation.Field2d;
import edu.wpi.first.wpilibj.smartdashboard.Field2d;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import io.github.frc5024.common_drive.gearing.Gear;
import io.github.frc5024.lib5k.bases.drivetrain.commands.PathFollowerCommand;
Expand Down Expand Up @@ -283,4 +283,4 @@ public void close() throws Exception {

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class DCBrushedMotor extends DCMotor {
*/
private DCBrushedMotor(double nominalVoltage, double stallTorque, double stallCurrent, double freeCurrent,
double freeSpeed) {
super(nominalVoltage, stallCurrent, stallCurrent, freeCurrent, freeSpeed);
super(nominalVoltage, stallTorque, stallCurrent, freeCurrent, freeSpeed, 1);

// Add a few extra fields
this.Kv = Units.radiansPerSecondToRotationsPerMinute(super.m_KvRadPerSecPerVolt);
this.freeSpeedRPM = Units.radiansPerSecondToRotationsPerMinute(super.m_freeSpeedRadPerSec);
this.Kv = Units.radiansPerSecondToRotationsPerMinute(super.KvRadPerSecPerVolt);
this.freeSpeedRPM = Units.radiansPerSecondToRotationsPerMinute(super.freeSpeedRadPerSec);

}

Expand All @@ -38,8 +38,8 @@ private DCBrushedMotor(double nominalVoltage, double stallTorque, double stallCu
* @param motor DCMotor
*/
public DCBrushedMotor(DCMotor motor) {
this(motor.m_nominalVoltageVolts, motor.m_stallTorqueNewtonMeters, motor.m_stallCurrentAmps,
motor.m_freeCurrentAmps, motor.m_freeSpeedRadPerSec);
this(motor.nominalVoltageVolts, motor.stallTorqueNewtonMeters, motor.stallCurrentAmps,
motor.freeCurrentAmps, motor.freeSpeedRadPerSec);
}

/**
Expand All @@ -49,7 +49,7 @@ public DCBrushedMotor(DCMotor motor) {
*/
public double getFreeSpeedRPM() {
if (this.freeSpeedRPM == null) {
this.freeSpeedRPM = Units.radiansPerSecondToRotationsPerMinute(super.m_freeSpeedRadPerSec);
this.freeSpeedRPM = Units.radiansPerSecondToRotationsPerMinute(super.freeSpeedRadPerSec);
}
return this.freeSpeedRPM.doubleValue();
}
Expand All @@ -61,7 +61,7 @@ public double getFreeSpeedRPM() {
*/
public double getKv() {
if (this.Kv == null) {
this.Kv = Units.radiansPerSecondToRotationsPerMinute(super.m_KvRadPerSecPerVolt);
this.Kv = Units.radiansPerSecondToRotationsPerMinute(super.KvRadPerSecPerVolt);
}
return this.Kv.doubleValue();
}
Expand All @@ -75,4 +75,4 @@ public DCMotor toDCMotor() {
return (DCMotor) this;
}

}
}