Updated to 2024.4.8.3

This commit is contained in:
thenetworkgrinch
2024-02-12 18:59:40 -06:00
parent 78349d6f2d
commit 74ac1351ef
117 changed files with 536 additions and 438 deletions

View File

@@ -1,5 +1,9 @@
package swervelib.parser.json;
import static swervelib.telemetry.SwerveDriveTelemetry.canIdWarning;
import static swervelib.telemetry.SwerveDriveTelemetry.i2cLockupWarning;
import static swervelib.telemetry.SwerveDriveTelemetry.serialCommsIssueWarning;
import com.revrobotics.SparkRelativeEncoder.Type;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.I2C;
@@ -26,8 +30,6 @@ import swervelib.motors.SparkMaxSwerve;
import swervelib.motors.SwerveMotor;
import swervelib.motors.TalonFXSwerve;
import swervelib.motors.TalonSRXSwerve;
import swervelib.telemetry.Alert;
import swervelib.telemetry.Alert.AlertType;
/**
* Device JSON parsed class. Used to access the JSON data.
@@ -35,36 +37,18 @@ import swervelib.telemetry.Alert.AlertType;
public class DeviceJson
{
/**
* An {@link Alert} for if the CAN ID is greater than 40.
*/
private final Alert canIdWarning = new Alert("JSON",
"CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
Alert.AlertType.WARNING);
/**
* An {@link Alert} for if there is an I2C lockup issue on the roboRIO.
*/
private final Alert i2cLockupWarning = new Alert("IMU",
"I2C lockup issue detected on roboRIO. Check console for more information.",
Alert.AlertType.WARNING);
/**
* NavX serial comm issue.
*/
private final Alert serialCommsIssueWarning = new Alert("IMU",
"Serial comms is interrupted with USB and other serial traffic and causes intermittent connected/disconnection issues. Please consider another protocol or be mindful of this.",
AlertType.WARNING);
/**
* The device type, e.g. pigeon/pigeon2/sparkmax/talonfx/navx
*/
public String type;
public String type;
/**
* The CAN ID or pin ID of the device.
*/
public int id;
public int id;
/**
* The CAN bus name which the device resides on if using CAN.
*/
public String canbus = "";
public String canbus = "";
/**
* Create a {@link SwerveAbsoluteEncoder} from the current configuration.