Updated YAGSL to next-gen

This commit is contained in:
thenetworkgrinch
2023-11-09 17:32:48 -06:00
parent 0b02b3c504
commit 6aaf512b38
21 changed files with 573 additions and 517 deletions

View File

@@ -187,24 +187,4 @@ public class DeviceJson
throw new RuntimeException(
"Could not create absolute encoder from data port of " + type + " id " + id);
}
/**
* Get the encoder pulse per rotation based off of the encoder type.
*
* @param angleEncoderPulsePerRotation The configured pulse per rotation.
* @return The correct pulse per rotation based off of the encoder type.
*/
public int getPulsePerRotation(int angleEncoderPulsePerRotation)
{
switch (type)
{
case "canandcoder":
return 360;
case "falcon":
case "talonfx":
return 2048;
default:
return angleEncoderPulsePerRotation;
}
}
}