View Single Post
  #14   Spotlight this post!  
Unread 07-02-2007, 12:21
kitscuzz's Avatar
kitscuzz kitscuzz is offline
Not alotta posts
AKA: Kit
FRC #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Home
Posts: 47
kitscuzz will become famous soon enough
Re: Bizarre Driving Issue

AndrewN:
We'll definitely try this, but I repeat that it's strange because in the example you've provided we actually get the correct values. when ps_x is less than 122, the code behaves as we originally expected. Where it doesn't behave properly is when p2_x exceeds 132, a case where there shouldn't even be a plausible overflow.

When it does exceed 132, the deadzone code returns 127. I guess that does seem to fit into the idea that it would only return 0, 1, or 2 after the division. But I guess I'm just looking for a reason why they would both work in completely opposite positions.

But then again, all things considered, you're all probably smarter than me anyway and this definitely fits the problem, because checking back in the notes, we got 128 occasionally.

Thanks.