-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Second Race Group in Auto sequence appears to run incorrect Named Command #643
Comments
How have you demonstrated that it is running the same command? There really isn't a way for it to pull the wrong command since it just uses the name in the file as a key for a hash map. My random guess would be that you are registering Not sure what you've tried, but I would try changing your |
My two commands print two different messages to the Dashboard. I made each command print incrementing numbers each execute call and I see the same command start at 1 each time eg: Find 1, find 2, find 3 in both cases, whereas the second Race group should be printing Find late 1, find late 2, find late 3 etc. As I mentioned, I created an auto with just the one race group. I can switch the named command and it runs which ever one I include (looking at the message on the dashboard.. So I know both are registered only once. It really is quite mystifying. |
Could you still try replacing the commands being registered with print commands just to isolate the problem? Also a link to your code, if possible, would be helpful. |
I'm sure this is a dumb question, but where does Commands.print() print to? |
The console you can see in the driver station or riolog in VSCode |
Describe the bug
I am using a Race Group in an auto sequence to end a path prematurely. ( when it sees a Note.)
I have two different commands that I use to race with a path depending on what stage of the Auto sequence I'm in.
My problem occurs when I have two Race Groups in an Auto sequence see below.
The first one terminates on an immediate detection, and the second is meant to wait for a triggering event before looking for notes.
I have spend several days trying to find out why the second note detection was not postponing it's detection. It would work fine when it was the first Race Group in the Auto Sequence, but not the second. I assumed I had some initialization error.
I initially had one Java command with different constructor parameters, but eventually I just created two independant java commands to verify that it wasn't some naming issue or other shared data issue.
BOTTOM LINE ....I have been able to demonstrate that instead of the correct named commaned being run in the second Race Group, the same command from the first group is being run again. ("FindNote" is being run in both instances) This would explain why a single use of this approach works. I have not been able to come up with any reason why this should be the case...
This duplicate execution is despite the fact that the two named commands are running two different Java commands .
Also, the correct path is run in both Race Groups, so these are not being repeated.
I have attempted multiple ways to prove that it was my software acting up here, but I can't. I have included my Path file as a txt file to see if there is something obvious in there. Any insight would be appreciated....
A-1-2-5.auto.txt
Versions: (please complete the following information):
The text was updated successfully, but these errors were encountered: