View Single Post
  #2   Spotlight this post!  
Unread 18-02-2008, 14:34
WaterFreak WaterFreak is offline
Registered User
FRC #0708 (Hardwired Fusion)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2002
Location: Warrington, PA
Posts: 29
WaterFreak is a splendid one to beholdWaterFreak is a splendid one to beholdWaterFreak is a splendid one to beholdWaterFreak is a splendid one to beholdWaterFreak is a splendid one to beholdWaterFreak is a splendid one to beholdWaterFreak is a splendid one to behold
Re: Logitech NASCAR Wheel / Chicklet Safety Issue?

one thing I could think to try would be to use a variable to "save" the value and a counter.

If the value = 127 three times in a row, disable movement until some "non-127" value.

Pseudo code might look a little like this......

if (fwd == 127) or (rev == 127)
{
count++;
}else
{
count = 0;
disable = false;
}

if (count == 3)
{
disable = true;
}

Hope this helps you.
__________________
Thanks, Jim Orr
Senior Software Engineer - Motorola, Connected Home
Supporting Team 708 - Hardwired Fusion
Reply With Quote