View Single Post
  #2   Spotlight this post!  
Unread 12-02-2010, 17:42
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Motor declarations break analog module

Without viewing the code I'm just guessing, but in my experience, when commenting out code which initializes something and noting bizarre side-effects, it is often useful to look at your compiler warnings or at the code directly for uninitialized variables. The compiler tends to allocate stack variables one after the other except that the optimizer may scramble the order or double up variable declarations. Anyway, if you have an uninitialized variable, these allocations can give your code different behaviors based upon the value that other function calls leave on the stack.

Greg McKaskle
Reply With Quote