Go to Post There are times when your team will struggle and there are times when it will achieve great victories. There will be times when unknown and uncontrollable factors will intercede to provide an unexpected outcome for which your team must compensate. - Travis Hoffman [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 27-01-2017, 10:42
dmelcer9 dmelcer9 is offline
Registered User
AKA: Daniel
FRC #0810 (Mechanical Bulls)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Smithtown
Posts: 51
dmelcer9 is an unknown quantity at this point
Re: Building Commands at Runtime

Quote:
Originally Posted by wlogeais View Post
Clearly that isn't true. To test this make a new CG() with cg.addSequential(new DriveForward()) then cg.addSequential(new Wait(10)). while it is waiting you'll find that your default-teleOP drive will be working.
But when you add a command to a commandgroup, the commandgroup calls requires for all the subsystems that the added commands require. (Source) Maybe DriveForward and the JoystickDriveCommand don't have their requires set up correctly?


Quote:
Originally Posted by wlogeais View Post
I'd propose that in this year’s game, given a non-symmetrical field, that a RedBlueStarter(redcmd, bluecmd) would be more desirable to some teams. That flexibility is difficult with your 2-choosers/Supplier based options.
You can supply a RedBlueDumpFuel command (or similar) via a supplier. It wouldn't be too hard to drop a ConditionalCommand into the sendablechooser instead of a regular command.

Quote:
Originally Posted by wlogeais View Post
Clearly your free to favor either of your Supplier/Optional ideas. But from a CSA perspective I'd be leery about logic that borders on needing a "how to verify 'unwinding the stack'" as a concern. (YOU may do this right, but does your team have any other programmers?).
I'm not sure what you mean by needing to verify unwinding the stack. Using a supplier is more defensive programming- even if another programmer hijacks one of the suppliers from the sendablechooser, the commands that are generated are different instances.
Reply With Quote
 


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 21:40.

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