|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#16
|
|||||
|
|||||
|
Re: Autonomous timing of events are to fast
I don't understand what your "read global variable" loop is intended to do. It's going to be continuously overwriting the global with the current motor value, which is likely to interfere with anything else trying to write the global. If that loop was newly added as part of implementing the global variable, remove it.
There is nowhere I can see that actually sets the motor value. You replaced the spot in Periodic Tasks where that was being done with another global variable write, where all you needed to do was replace the constant 0 with a read of the variable. The only places that should be writing the global are what used to be setting the motor value in the autonomous sequence. I also don't see why you added a rearMotors global. Was something interfering with it as well? |
|
#17
|
|||
|
|||
|
Re: Autonomous timing of events are to fast
I cleaned up and attached the code with corrections. I can't check the code on our robot until district championships, so I am relying on your feedback to get this running.
Thanks again! |
|
#18
|
||||
|
||||
|
Re: Autonomous timing of events are to fast
Why do you have the driver station writing a value to the frontMotors, my interpretation from Alan is to write your frontMotor global values from the periodic task to your motors. You can still have your driverstation determine what the value of the frontMotors.
|
|
#19
|
|||
|
|||
|
Re: Autonomous timing of events are to fast
We read from the driver station so that it is easy to tune the motors for a shot. Will it not work this way? Our shot was fairly consistant in our last district event and can set it in the global. Do I need to do this to make the global work? I'm new to globals.
Last edited by grosh : 05-04-2014 at 22:23. |
|
#20
|
||||
|
||||
|
Re: Autonomous timing of events are to fast
Edit: I think I'm reading your code wrong. Your frontMotor values are suppose to be set in periodic task and you're doing something that I can't see in auto, correct. The code is fine. Sorry for the confusion.
Last edited by Kevin Phan : 05-04-2014 at 22:32. Reason: Misinterperrtation |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|