![]() |
Selecting out autonomous mode
We have our auto modes in a case structure, with the selector being a double which is read from the dashboard. When we run auto mode, whichever number that was in the control when the code was deployed is the mode that it runs. Changing the number does nothing, disabling and reenabling simply runs the same auto again. Does anyone know why this is happening?
|
Re: Selecting out autonomous mode
Try using an integer or an enum to choose between cases instead of a double.
|
Re: Selecting out autonomous mode
When are you reading from the dashboard? (Make sure that you are reading from the dashboard every time you start teleop instead of everytime the robot restarts)
|
Re: Selecting out autonomous mode
We are using the built in functionality to read values from the dashboard
|
Re: Selecting out autonomous mode
Can you post your code?
|
Re: Selecting out autonomous mode
Quote:
|
Re: Selecting out autonomous mode
1 Attachment(s)
Keep in mind that I'm pretty new to all this. This is how I did the autonomous switching this year.
|
Re: Selecting out autonomous mode
Past years, my team used a hard switch to select different autonomous modes. eStop robotics currently has an expansion port add-on that will give you an auto switch plus more analog and digital pins. Understanding that you are using the dashboard and this being in a LabVIEW thread, there are two vis that are responsible for information transferring between the robot and dashboard. The write vi is what the value is being assigned. The read vi is taking the value that was assigned and outputting it. Make sure the name both on the robot and dashboard is the same, if they are not it will not recognize them. This means the write vi in your dashboard has the same name as the read vi in your auto independent in your robot project. Now I would make your numeric control vi for your dashboard to be represented as an integer, this is just to keep sanity. If your problem still persists, please take a screenshot of your code and put it up. If you are uncomfortable with that you can just pm me.
|
| All times are GMT -5. The time now is 10:26. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi