View Single Post
  #2   Spotlight this post!  
Unread 16-02-2013, 20:52
Cel Skeggs Cel Skeggs is offline
Robot Software Manager Alumnus
AKA: Previously known as Colby
FRC #1540 (The Flaming Chickens)
Team Role: Alumni
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Portland, Oregon, USA
Posts: 107
Cel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of lightCel Skeggs is a glorious beacon of light
Re: Encoder Doesn't Reset to Zero

How are you displaying the current encoder value?
This sounds like a common display bug where the line isn't cleared before printing a new number.
If an output contains '217' and '0' is printed without clearing the line, then you'd get '017'.
There are a few ways to fix this (if it is the problem): Clear the line before writing a number, or append spaces to the number that you are printing.
By appending spaces before printing, '217' and '0 ' would be seen as '0' instead of '017'
Reply With Quote