mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
don't use uninitialized variables
Change-Id: I9869c3bf64f00ddff641e5dc06b16179c3b3ce2f
This commit is contained in:
committed by
James Kuszmaul
parent
d1d28e70e1
commit
880eae1424
@@ -760,6 +760,10 @@ void CANJaguar::verify()
|
||||
message = LM_API_POS_PC;
|
||||
else if(m_controlMode == kCurrent)
|
||||
message = LM_API_ICTRL_PC;
|
||||
else {
|
||||
wpi_setWPIErrorWithContext(IncompatibleMode, "PID constants only apply in Speed, Position, and Current mode");
|
||||
return;
|
||||
}
|
||||
|
||||
if(getMessage(message, CAN_MSGID_FULL_M, dataBuffer, &dataSize))
|
||||
{
|
||||
@@ -788,6 +792,10 @@ void CANJaguar::verify()
|
||||
message = LM_API_POS_IC;
|
||||
else if(m_controlMode == kCurrent)
|
||||
message = LM_API_ICTRL_IC;
|
||||
else {
|
||||
wpi_setWPIErrorWithContext(IncompatibleMode, "PID constants only apply in Speed, Position, and Current mode");
|
||||
return;
|
||||
}
|
||||
|
||||
if(getMessage(message, CAN_MSGID_FULL_M, dataBuffer, &dataSize))
|
||||
{
|
||||
@@ -816,6 +824,10 @@ void CANJaguar::verify()
|
||||
message = LM_API_POS_DC;
|
||||
else if(m_controlMode == kCurrent)
|
||||
message = LM_API_ICTRL_DC;
|
||||
else {
|
||||
wpi_setWPIErrorWithContext(IncompatibleMode, "PID constants only apply in Speed, Position, and Current mode");
|
||||
return;
|
||||
}
|
||||
|
||||
if(getMessage(message, CAN_MSGID_FULL_M, dataBuffer, &dataSize))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user