mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[xrp] Fix motor support (#8916)
The protocol layer got out of sync with the rename to throttle.
This commit is contained in:
@@ -144,9 +144,9 @@ void XRP::HandleMotorSimValueChanged(const wpi::util::json& data) {
|
||||
deviceId = 3;
|
||||
}
|
||||
|
||||
auto dutyCycle = motorData->lookup("<duty_cycle");
|
||||
if (deviceId != -1 && dutyCycle && dutyCycle->is_number()) {
|
||||
m_motor_outputs[deviceId] = dutyCycle->get_number();
|
||||
auto throttle = motorData->lookup("<throttle");
|
||||
if (deviceId != -1 && throttle && throttle->is_number()) {
|
||||
m_motor_outputs[deviceId] = throttle->get_number();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user