|
Re: pic: Lab view
Other suggestions with the rest of the code: First of all, don't have all of you code in teleop. The more code you have in teleop, the laggier your controls will be since all of the code is waiting for each other before it starts another iteration. What I recommend you to do is, write all the outputs from the buttons to global variables and then put all of your code in periodic tasks with separate loops and read the global variable from teleop. Doing this also allows you to have your code run in autonomous, so you can just write to your global variables instead of rewriting all of your code in autonomous. You don't have much code, so this is not a necessity this year. Another suggestion, you are using case structures like selects, so the case structure is a bit unnecessary. Also, the "motor set vi" reads values from -1 to 1, not -255 to 255. Other than that, it looks fine.
Hope this helps!
__________________
2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day ])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
|