|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: sample code to move robot autonomously
Hey Luke i found out the problem i used Soleniod to call the solenoid in teleop but had used a small "s" in the autonpmous code .........gosh one littel letter makes a huge difference, maybe labview needs to have a watch dog for goofy programmers
thanks john for now i think i have it, one more thing i believe should be able to add case structures as i want to add a few more moves in autonomous right???? thanks again John |
|
#2
|
||||
|
||||
|
Re: sample code to move robot autonomously
Yeah, gotta be careful with that reference registry.
Yep, all you need to do is add states (items) to your enum and add cases in the case structure to handle them. Just make sure to add a condition to move to the new state. Also, check out FRCmastery (lvmastery.com too), they have a state machine video tutorial over there. Last edited by Luke Pike : 17-02-2010 at 15:54. Reason: Added links |
|
#3
|
|||
|
|||
|
Re: sample code to move robot autonomously
HI me again
In a step back we changed the enum into a type def, when that happens if you right click on the enum there is no way that i can see to add more states, an edit itme never shows up, i did go to properties and there an edit item there but it does not allow changes, i can go back and start from the beginning but add a number of states and then go thru and add all the case states, but it seems to me there must be an easier way, also if I do change the enum to a constant if i were to add any states then the pull down menu at the top of the case loop changes and does not reflect what is in the enum?? thanks again for your help, i do think i am getting way closer to what i want to do. thanks John |
|
#4
|
||||
|
||||
|
Re: sample code to move robot autonomously
If your enum is now a typedef, then when you want to add items, you need to open the typedef and perform the edits there.
Right-click the enum, open typedef. Right-click THAT enum and you'll be able to modify its properties. When you save/close that typedef, it'll update every instance for you. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sample code | johncap100 | NI LabVIEW | 2 | 01-02-2010 08:18 |
| Missing sample code | ajdecker1022 | Java | 3 | 28-01-2010 19:39 |
| Sample Code | Belly | Programming | 1 | 21-01-2010 14:34 |
| Sample Code | Japper | Programming | 2 | 01-12-2008 22:36 |
| Sample PID code??? | EHaskins | Programming | 14 | 08-08-2006 14:18 |