Added more

This commit is contained in:
thenetworkgrinch
2023-02-22 23:10:57 -06:00
parent dd7d432e90
commit cd7751ef71
2 changed files with 11 additions and 3 deletions

View File

@@ -22,15 +22,17 @@ public class NavXSwerve extends SwerveIMU
/**
* Constructor for the NavX swerve.
*
* @param port Serial Port to connect to.
*/
public NavXSwerve()
public NavXSwerve(SerialPort.Port port)
{
try
{
/* Communicate w/navX-MXP via the MXP SPI Bus. */
/* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */
/* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */
gyro = new AHRS(SerialPort.Port.kMXP);
gyro = new AHRS(port);
SmartDashboard.putData(gyro);
} catch (RuntimeException ex)
{