|
Re: problem with autonomous that has stumped all programmers so far
if the only thing you changed was adding this stuff:
SECS_TO_TICKS(a) ( ((int)(a)) * 10000 / 262 )
then maybe its not doing what you think it is?
int is signed, isnt it? so if a = 4 you end up with 40,000 which is a negative number divide by 262?
if this is what you changed and it got weird on you, just work with the tick counts in your code forget the fancy translations.
also could try running with a few printf statements and see what is happening at the start and end of each state - there might be something weird going on.
|