Updated YAGSL to contain NavX fix, center of rotation, and warnings under certain circumstances.

This commit is contained in:
thenetworkgrinch
2023-11-09 20:53:40 -06:00
parent a0d8d440e3
commit 035dba4fe2
113 changed files with 430 additions and 264 deletions

View File

@@ -53,6 +53,11 @@ public class DeviceJson
*/
public SwerveAbsoluteEncoder createEncoder(SwerveMotor motor)
{
if (id > 40)
{
DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
false);
}
switch (type)
{
case "none":
@@ -87,6 +92,11 @@ public class DeviceJson
*/
public SwerveIMU createIMU()
{
if (id > 40)
{
DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
false);
}
switch (type)
{
case "adis16448":
@@ -130,6 +140,11 @@ public class DeviceJson
*/
public SwerveMotor createMotor(boolean isDriveMotor)
{
if (id > 40)
{
DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
false);
}
switch (type)
{
case "sparkmax_brushed":