Go to Post We score 8 out of 10 every match. Oh wait, that's just what it does in theory. ;) Man, I wish that theory worked. - Chriszuma [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-03-2014, 23:17
Tedi Tedi is offline
Registered User
FRC #4343
 
Join Date: Mar 2014
Location: Aurora
Posts: 3
Tedi is an unknown quantity at this point
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
Reply With Quote
  #2   Spotlight this post!  
Unread 05-03-2014, 02:18
irvingc irvingc is offline
Registered User
FRC #0948 (Newport Robotics Group)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Bellevue, WA
Posts: 31
irvingc is on a distinguished road
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-03-2014, 18:46
Tedi Tedi is offline
Registered User
FRC #4343
 
Join Date: Mar 2014
Location: Aurora
Posts: 3
Tedi is an unknown quantity at this point
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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