softpwm only a little change
Fork of SoftPWM by
Revision 1:6d557e90686e, committed 2017-12-15
- Comitter:
- wanzq
- Date:
- Fri Dec 15 17:26:23 2017 +0000
- Parent:
- 0:7918ce37626c
- Commit message:
- softpwm changed a little
Changed in this revision
SoftPWM.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7918ce37626c -r 6d557e90686e SoftPWM.cpp --- a/SoftPWM.cpp Wed Oct 23 19:31:14 2013 +0000 +++ b/SoftPWM.cpp Fri Dec 15 17:26:23 2017 +0000 @@ -9,7 +9,7 @@ else pulse = 1; positive = _positive; - interval = 0.02; + interval = 0.005; width = 0; start(); } @@ -93,7 +93,7 @@ pulse = 0; else pulse = 1; -// _timeout.detach(); + _timeout.detach();//原库中此句被注释掉 可能是作者认为此语句会占用cpu时间,但事实上注释掉后会在低占空比下消耗cpu时间并产生一些莫名其妙的问题 } ;