mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Invert right side motors in MecanumDrive sendable (#933)
This aligns with the current behavior of DifferentialDrive Fixes shuffleboard#404
This commit is contained in:
committed by
Peter Johnson
parent
67f9c9a5b3
commit
77d6c11743
@@ -134,12 +134,12 @@ void MecanumDrive::InitSendable(SendableBuilder& builder) {
|
||||
[=]() { return m_frontLeftMotor.Get(); },
|
||||
[=](double value) { m_frontLeftMotor.Set(value); });
|
||||
builder.AddDoubleProperty(
|
||||
"Front Right Motor Speed", [=]() { return m_frontRightMotor.Get(); },
|
||||
[=](double value) { m_frontRightMotor.Set(value); });
|
||||
"Front Right Motor Speed", [=]() { return -m_frontRightMotor.Get(); },
|
||||
[=](double value) { m_frontRightMotor.Set(-value); });
|
||||
builder.AddDoubleProperty("Rear Left Motor Speed",
|
||||
[=]() { return m_rearLeftMotor.Get(); },
|
||||
[=](double value) { m_rearLeftMotor.Set(value); });
|
||||
builder.AddDoubleProperty("Rear Right Motor Speed",
|
||||
[=]() { return m_rearRightMotor.Get(); },
|
||||
[=](double value) { m_rearRightMotor.Set(value); });
|
||||
builder.AddDoubleProperty(
|
||||
"Rear Right Motor Speed", [=]() { return -m_rearRightMotor.Get(); },
|
||||
[=](double value) { m_rearRightMotor.Set(-value); });
|
||||
}
|
||||
|
||||
@@ -189,11 +189,11 @@ public class MecanumDrive extends RobotDriveBase {
|
||||
builder.setSmartDashboardType("MecanumDrive");
|
||||
builder.addDoubleProperty("Front Left Motor Speed", m_frontLeftMotor::get,
|
||||
m_frontLeftMotor::set);
|
||||
builder.addDoubleProperty("Front Right Motor Speed", m_frontRightMotor::get,
|
||||
m_frontRightMotor::set);
|
||||
builder.addDoubleProperty("Front Right Motor Speed", () -> -m_frontRightMotor.get(),
|
||||
value -> m_frontRightMotor.set(-value));
|
||||
builder.addDoubleProperty("Rear Left Motor Speed", m_rearLeftMotor::get,
|
||||
m_rearLeftMotor::set);
|
||||
builder.addDoubleProperty("Rear Right Motor Speed", m_rearRightMotor::get,
|
||||
m_rearRightMotor::set);
|
||||
builder.addDoubleProperty("Rear Right Motor Speed", () -> -m_rearRightMotor.get(),
|
||||
value -> m_rearRightMotor.set(-value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user