Author Topic: C++ / Java: Can not conditionally run commands in a command group  (Read 731 times)

Louis L

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
Got this from Brayden; followed up searching on Chief Delphi.

It seems command groups are constructed once when the robot first starts. This means the command group can not obtain an external value at a later time (ex: read a sensor value) and then conditionally do something based on that value. Values must be set when the command group is constructed; not later. The same command group object is reused each time it is called (ex: in response to a button press). The workaround for this is to create multiple command groups and externally execute the conditional which then fires off the correct command group.