View Single Post
  #13   Spotlight this post!  
Unread 24-04-2016, 23:08
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: JAVA Command Group Question

Quote:
Originally Posted by MrRoboSteve View Post
Hard to see how multiple threads will improve things for teams that are tripped up by Java's call by value semantics.
Again, I don't see this as a problem with the way Java works, I see this as a problem with the way CommandGroups use Java. There are plenty of workarounds to make CommandGroup work if you understand why it is so limited, but every suggestion that I have seen is code that I consider fairly ugly and overly complicated. I would much rather use a framework that allows for real time decision making. That means more than just being able to pass variables into Commands, it also includes having if statements and while loops, and the capacity to be more specific about when a Command should start other than just addSequential and addParallel. The 2 best ways I can think of doing this are a state machine and a separate thread. State machines are hard to create a CommandGroup like framework for, and overall take a significantly longer time to code. But it is possible to have something very similar to CommandGroup on a separate thread, with 1 liners that will run a Command once certain parameters are met.
Reply With Quote