|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Calling on Functions
My program is set so that i have my shoot, grab, compressor all as different global signatures and calling it from within the teleop. Each function seems to be working fine individually. However when I put them all together No part of my program wants to work
Code:
public void teleopPeriodic(){
Shoot();
Timer.delay(0.1)
}
// the shooter would work fine
Code:
public void teleopPeriodic(){
Shoot();
Grab();
Cyl();
Timer.delay(0.1)
}
//no part of each function has the same properties as the other function. Program won't do anything. Seems like the functions don't want to work.
|
|
#2
|
||||||
|
||||||
|
Re: Calling on Functions
Is there a stack trace in the output in netbeans? It may scroll off the screen quickly, so be sure to scroll back and look for it.
One common problem that would only manifest itself when everything is combined is trying to allocate the same hardware twice (for example using PWM 1 in both Shoot and Grab. If you want more specific suggestions, you'll have to post your code. Not related to this problem, but you should not put any explicit delay in any of the periodic methods. |
|
#3
|
||||
|
||||
|
Re: Calling on Functions
Do any of the functions have waits in them or touch the same variables?
|
|
#4
|
|||||
|
|||||
|
Re: Calling on Functions
Is teleopPeriodic() actually being called?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|