Skip to content

Commit 3fb228a

Browse files
committed
feat: Allow value 0 for acceleration limit as discussed in #10
1 parent 9880083 commit 3fb228a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/myactuator_rmd/actuator_interface.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ namespace myactuator_rmd {
294294
*
295295
* \param[in] acceleration
296296
* The desired acceleration/deceleration in dps with a resolution of 1 dps/s [100, 60000]
297+
* For continuous motions the acceleration should be set to the value 0, see
298+
* https://github.com/2b-t/myactuator_rmd/issues/10#issuecomment-2195847459
297299
* \param[in] mode
298300
* The mode of the desired acceleration/deceleration to be set
299301
*/

src/protocol/requests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace myactuator_rmd {
3636

3737
SetAccelerationRequest::SetAccelerationRequest(std::uint32_t const acceleration, AccelerationType const mode)
3838
: SingleMotorRequest{} {
39-
if ((acceleration < 100) || (acceleration > 60000)) {
39+
if ((acceleration != 0) && ((acceleration < 100) || (acceleration > 60000))) {
4040
throw ValueRangeException("Acceleration value '" + std::to_string(acceleration) + "' out of range [100, 60000]");
4141
}
4242
auto const acceleration_type {static_cast<std::uint8_t>(mode)};

0 commit comments

Comments
 (0)