mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Update YAGSL to handle controls better
This commit is contained in:
@@ -43,10 +43,6 @@ public class ModuleJson
|
||||
* The angle encoder pulse per revolution override. 1 for Neo encoder. 2048 for Falcons.
|
||||
*/
|
||||
public double angleEncoderPulsePerRevolution = 0;
|
||||
/**
|
||||
* Angle motor free speed RPM.
|
||||
*/
|
||||
public double angleMotorFreeSpeedRPM = 0;
|
||||
/**
|
||||
* The location of the swerve module from the center of the robot in inches.
|
||||
*/
|
||||
@@ -59,13 +55,15 @@ public class ModuleJson
|
||||
* @param velocityPIDF The velocity PIDF values for the drive motor.
|
||||
* @param maxSpeed The maximum speed of the robot in meters per second.
|
||||
* @param physicalCharacteristics Physical characteristics of the swerve module.
|
||||
* @param name Module json filename.
|
||||
* @return {@link SwerveModuleConfiguration} based on the provided data and parsed data.
|
||||
*/
|
||||
public SwerveModuleConfiguration createModuleConfiguration(
|
||||
PIDFConfig anglePIDF,
|
||||
PIDFConfig velocityPIDF,
|
||||
double maxSpeed,
|
||||
SwerveModulePhysicalCharacteristics physicalCharacteristics)
|
||||
SwerveModulePhysicalCharacteristics physicalCharacteristics,
|
||||
String name)
|
||||
{
|
||||
SwerveMotor angleMotor = angle.createMotor(false);
|
||||
SwerveAbsoluteEncoder absEncoder = encoder.createEncoder();
|
||||
@@ -93,6 +91,6 @@ public class ModuleJson
|
||||
inverted.angle,
|
||||
angleEncoderPulsePerRevolution == 0 ? physicalCharacteristics.angleEncoderPulsePerRotation
|
||||
: angleEncoderPulsePerRevolution,
|
||||
angleMotorFreeSpeedRPM == 0 ? physicalCharacteristics.angleMotorFreeSpeedRPM : angleMotorFreeSpeedRPM);
|
||||
name.replaceAll("\\.json", ""));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user