You are reading a single comment by @TheLogan and its replies.
Click here to read the full conversation.
-
I can totally see your point, I may have misunderstood what is happening.
I tried using the convention here:analogWrite(pin, (1+pos) / 50.0, {freq:20, soft: false });
Where what I actually saw was:
{soft: false}
made the motor move to the position and hold that position, while soft: true, or no value would make the servo move to the position and then it would just go slack. I figured that soft in this case meant whether or not it should go slack.How would you suggest the change be implemented? :)
Tbh, I'm not a fan of the merge:
The now optional parameter 'soft' is neither clear nor concise, it can just mean anything. In the context of Espruino it usually means a software implemented function (serial, i2c, pwm, timer interrupt). It's difficult to understand that 'soft: false' in this case actually means 'move the servo slowly and then hold the position'. And the result of 'soft: true' isn't documented at all.
In line line 116 in devices/Servo Motors.md was changed to use software PWM instead of hardware PWM, besides the fact that the description above says 'You can also use a hardware timer to produce the pulse...'. And in line 119 in devices/Servo Motors.md only the comment was modified, now it includes '... devices/Servo Motors.md'. I'd say '// move to position 0.5 over 1 second' would be correct.