mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Fixed robot drive for C++ Simulation
initial values for m_invertedMotors is now 1 previously it was done in some of the constructors, but not all of them. Change-Id: I2c1ce8d8a67f82d02c4c51f1c4d1aaad143f3112
This commit is contained in:
@@ -52,11 +52,6 @@ RobotDrive::RobotDrive(uint32_t leftMotorChannel, uint32_t rightMotorChannel)
|
||||
InitRobotDrive();
|
||||
m_rearLeftMotor = std::make_shared<Talon>(leftMotorChannel);
|
||||
m_rearRightMotor = std::make_shared<Talon>(rightMotorChannel);
|
||||
|
||||
for (int32_t i=0; i < kMaxNumberOfMotors; i++)
|
||||
{
|
||||
m_invertedMotors[i] = 1;
|
||||
}
|
||||
SetLeftRightMotorOutputs(0.0, 0.0);
|
||||
m_deleteSpeedControllers = true;
|
||||
}
|
||||
@@ -79,10 +74,6 @@ RobotDrive::RobotDrive(uint32_t frontLeftMotor, uint32_t rearLeftMotor,
|
||||
m_rearRightMotor = std::make_shared<Talon>(rearRightMotor);
|
||||
m_frontLeftMotor = std::make_shared<Talon>(frontLeftMotor);
|
||||
m_frontRightMotor = std::make_shared<Talon>(frontRightMotor);
|
||||
for (int32_t i=0; i < kMaxNumberOfMotors; i++)
|
||||
{
|
||||
m_invertedMotors[i] = 1;
|
||||
}
|
||||
SetLeftRightMotorOutputs(0.0, 0.0);
|
||||
m_deleteSpeedControllers = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user