mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Merge "Require Jaguar version v108 or higher."
This commit is contained in:
@@ -179,16 +179,16 @@ void CANJaguar::InitCANJaguar()
|
||||
return;
|
||||
|
||||
// 3330 was the first shipping RDK firmware version for the Jaguar
|
||||
if (m_firmwareVersion >= 3330 || m_firmwareVersion < 101)
|
||||
if (m_firmwareVersion >= 3330 || m_firmwareVersion < 108)
|
||||
{
|
||||
char buf[256];
|
||||
if (m_firmwareVersion < 3330)
|
||||
{
|
||||
snprintf(buf, 256, "Jag #%d firmware (%d) is too old (must be at least version 101 of the FIRST approved firmware)", m_deviceNumber, m_firmwareVersion);
|
||||
snprintf(buf, 256, "Jag #%d firmware (%d) is too old (must be at least version 108 of the FIRST approved firmware)", m_deviceNumber, m_firmwareVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buf, 256, "Jag #%d firmware (%d) is not FIRST approved (must be at least version 101 of the FIRST approved firmware)", m_deviceNumber, m_firmwareVersion);
|
||||
snprintf(buf, 256, "Jag #%d firmware (%d) is not FIRST approved (must be at least version 108 of the FIRST approved firmware)", m_deviceNumber, m_firmwareVersion);
|
||||
}
|
||||
wpi_setWPIErrorWithContext(JaguarVersionError, buf);
|
||||
return;
|
||||
|
||||
@@ -217,6 +217,20 @@ public class CANJaguar implements MotorSafety, PIDOutput, SpeedController, LiveW
|
||||
// Not all Jaguar firmware reports a hardware version.
|
||||
m_hardwareVersion = 0;
|
||||
}
|
||||
|
||||
// 3330 was the first shipping RDK firmware version for the Jaguar
|
||||
if (m_firmwareVersion >= 3330 || m_firmwareVersion < 108)
|
||||
{
|
||||
if (m_firmwareVersion < 3330)
|
||||
{
|
||||
DriverStation.reportError("Jag " + m_deviceNumber + " firmware " + m_firmwareVersion + " is too old (must be at least version 108 of the FIRST approved firmware)", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
DriverStation.reportError("Jag" + m_deviceNumber + " firmware " + m_firmwareVersion + " is not FIRST approved (must be at least version 108 of the FIRST approved firmware)", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user