mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Fix mis-use of LIMIT
This commit is contained in:
parent
881e5a48bc
commit
4e479caf61
@ -127,7 +127,7 @@ void Servo::writeMicroseconds(int value) {
|
|||||||
byte channel = this->servoIndex;
|
byte channel = this->servoIndex;
|
||||||
if (channel < MAX_SERVOS) { // ensure channel is valid
|
if (channel < MAX_SERVOS) { // ensure channel is valid
|
||||||
// ensure pulse width is valid
|
// ensure pulse width is valid
|
||||||
LIMIT(value, SERVO_MIN(), SERVO_MAX()) - (TRIM_DURATION);
|
value = constrain(value, SERVO_MIN(), SERVO_MAX()) - (TRIM_DURATION);
|
||||||
value = usToTicks(value); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009
|
value = usToTicks(value); // convert to ticks after compensating for interrupt overhead - 12 Aug 2009
|
||||||
|
|
||||||
CRITICAL_SECTION_START;
|
CRITICAL_SECTION_START;
|
||||||
|
Loading…
Reference in New Issue
Block a user