Thread
:
Globe Motor Programming Questions
View Single Post
#
9
19-07-2006, 20:37
Pat Fairbank
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Re: Globe Motor Programming Questions
Quote:
Originally Posted by
Qbranch
I just do this:
Code:
... if (pwm01 > 127) pwm01+=4; else if (pwm01 < 127) pwm01-=4; ...
Um... wouldn't that cause pwm01 to overflow at values near 254? (and underflow at values near 0?)
__________________
Patrick Fairbank
Team 254
| Mentor (2012-)
Team 1503
| Mentor (2007-2011)
Team 296
| Alumnus (2001-2004) | Mentor (2005-2006)
patfairbank.com
Pat Fairbank
View Public Profile
Visit Pat Fairbank's homepage!
Find all posts by Pat Fairbank
Find CD-Media Photos by Pat Fairbank
Find CD-Media Papers by Pat Fairbank