Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Calling on Functions (http://www.chiefdelphi.com/forums/showthread.php?t=125710)

JavaNoNothing14 02-02-2014 18:15

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.


Joe Ross 02-02-2014 18:21

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.

SoftwareBug2.0 02-02-2014 18:27

Re: Calling on Functions
 
Do any of the functions have waits in them or touch the same variables?

Alan Anderson 02-02-2014 19:05

Re: Calling on Functions
 
Is teleopPeriodic() actually being called?


All times are GMT -5. The time now is 02:29.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi