![]() |
Re: problem with autonomous that has stumped all programmers so far
If your program is storing its state in a variable, the variable is not reset until the robot is reset. Hit the "robot reset" button on the OI, not the one on the RC. This should solve the problem. Hope that it does. :)
|
Re: problem with autonomous that has stumped all programmers so far
WOW i didnt even see that. okay but before you go basing all of your code off 26.6 ms, do a search on CD. it turns out that ( if i understand correctly ) each cycle IS NOT 26.6 ms, and that it varies depending on what code is executed. it is a MAX of 26.6 ms. so use something more concrete. like a timer inturupt. or a wheel counter. if your redoing all of your electronics, you might as well
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
--edit-- also, let me explain my reasoning for not including a in-code reset for the autonomous mode timer variables. if, for some reason or other, the robot controller got a garbled packet that somehow made it though and set autonomous_mode to 0 for a cycle, i did not want a random team having to watch as their robot restarted its autonomous mode in the middle of the field :/ I felt that it was simpler to have the robot remember where it was, seeing as (as someone already mentioned) one can hit the reset button and have it ready to go again. It's a matter of personal preference, feel free to zero them out if you wish. |
Re: problem with autonomous that has stumped all programmers so far
Quote:
Cheers! |
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
unsigned long.... comon guys its got plenty of ram
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
easiest fix is to divide it out and multiply the number of seconds you want by 38 - thats what Im doing in my code, assuming 38 cycles per second
and since we are all tweaking this by observing the machine on the field, and nudging the numbers a little, it doenst really matter if your seconds are lockstep with the National Beuro of Standards in Bolder Colorado or better yet, forget seconds and work in loop counts - one less thing to worry about. |
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
Re: problem with autonomous that has stumped all programmers so far
I've only had a robot to test with for 8 days and 7 of them I have been chasing a problem like the initial message had. That is, you do a printf, a calcualtion and another printf - and the second printf never appears!!!
I'm beginning to believe that my problem is using "long" integers. Something in that compiler is weird. Any body else had this experience? Did youfind a solution? I have too many lines of code - so rewriting them is impossible. So much code to debug, so little time! |
Re: problem with autonomous that has stumped all programmers so far
Sorry it took so long for me to get bak to you all. The code is working now and we should be fine once we get to Atlanta, thanx for all your help people! :)
|
Re: problem with autonomous that has stumped all programmers so far
Quote:
|
| All times are GMT -5. The time now is 00:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi