Wrap macros to prevent bad expansions
This commit is contained in:
parent
7bb7ac8353
commit
f9ded2a7c4
32 changed files with 158 additions and 158 deletions
|
|
@ -281,7 +281,7 @@ void Servo::writeMicroseconds(int value) {
|
|||
byte channel = this->servoIndex;
|
||||
if (channel < MAX_SERVOS) { // ensure channel is valid
|
||||
// ensure pulse width is valid
|
||||
value = constrain(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
|
||||
|
||||
CRITICAL_SECTION_START;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue