Skip to content

Commit f109c2f

Browse files
committed
Bugfix: No need to increment the ID when setting the max torque, this is a leftover error from earlier code.
1 parent b6ae0d2 commit f109c2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/motors/SmartServo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void SmartServoClass::setMaxTorque(uint16_t const torque)
283283
void SmartServoClass::setMaxTorque(uint8_t const id, uint16_t const torque)
284284
{
285285
mbed::ScopedLock<rtos::Mutex> lock(_mtx);
286-
writeWordCmd(id+1, REG(SmartServoRegister::MAX_TORQUE_H), torque);
286+
writeWordCmd(id, REG(SmartServoRegister::MAX_TORQUE_H), torque);
287287
}
288288

289289
void SmartServoClass::setID(uint8_t const id)

0 commit comments

Comments
 (0)