View Single Post
  #13   Spotlight this post!  
Unread 12-03-2008, 13:17
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Inverting the direction of a Motor

Quote:
Originally Posted by Alan Anderson View Post
Your example numbers aren't quite right. 178 is neutral plus 51, and 78 is neutral minus 49.
It's force of habit. We do all our logic on signed chars by subtracting 128 from the unsigned chars. It makes us off by 1 here and there, but we don't risk over or underflowing on endpoints.

Slightly off-topic, since the new controllers were introduced in 2004, I haven't had an issue with the full 0-255 range on PWM outputs. 255 seems to be a valid value, has anyone had any issues?

I haven't hit 255 on the OI analog inputs though.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...

Last edited by Mr. Lim : 12-03-2008 at 13:19.