forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change servo defaults to safer defaults (esp8266#7023)
* The default timings were chosen vastly outside specification. On COTS servos, this causes much confusion for the user, because a wide range of angle starting from 0 degress, and a just a large range of angle leading up to 180 degrees, is dead - in fact, the servo doesn't move at all, from any position. Not investigated further for obvious reasons, as this may have also destroyed servos that ran hot trying to abide by the PWM signal but could not mechanically! * Change timing limits to safe values. With previous default timings and safety limits, popular servos could force against internal physical endstops, which could overload and destroy them. * Review action: revert changes to hard boundary for min/max duty cycle timings. Internal review, fix/drop legacy comments. * A Servo on each available ESP8266 GPIO (D0-D8), no observed interference. * Remove possible jerk due to force-cancelling duty cycle. * Overload attach: can specify initial angle for servo, too. * Stricter checks for configured, and default, bounded timings. * Missed the min/max in a comment. * Default microsecond lower bound of 1000 causes confusing behavior - 200 is minimum enforced elsewhere, so use it here too as nearest multiple of 100 from 180. * Comment rationale for changed defaults of min/max pulse widths. Comment rationale for changed defaults of min/max pulse widths.
- Loading branch information
Showing
2 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters