Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   initialize() Method - Command Based (http://www.chiefdelphi.com/forums/showthread.php?t=127501)

Tedi 04-03-2014 23:17

initialize() Method - Command Based
 
Hey guys,
So I was reading the wpilib documentation on the initialize() method within a command and it stated that the initialize() method will run "immediately before the command is executed for the first time and every subsequent time it is started". Now when we tested with our robot, it seemed like the initialize() method would only run when the class was instantiated and not every time the command was started. Could anyone please tell me if the initialize() method is supposed to run every time the command is started or is it acting as it should.
Thanks

irvingc 05-03-2014 02:18

Re: initialize() Method - Command Based
 
It should be running every time the command is started - and definitely NOT immediately upon object instantiation. If you post some code and describe your observations in more detail, perhaps we can help to identify the problem.

Tedi 05-03-2014 18:46

Re: initialize() Method - Command Based
 
Thanks for the reply. So we're actually going to re-write the code for our robot and if we continue to have the same problem I'll be sure to post here again. Thanks for your help.


All times are GMT -5. The time now is 22:40.

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