View Single Post
  #8   Spotlight this post!  
Unread 28-12-2014, 21:40
dougwilliams's Avatar
dougwilliams dougwilliams is offline
Engineer - Controls, Electronics
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: May 2013
Rookie Year: 2013
Location: Vestal, NY
Posts: 109
dougwilliams is on a distinguished road
Re: Command Based Auto - Windriver C++ Having trouble to add sequential auto commands

Thanks for the help. So here's the latest...

When we call the autonomous group it seems to not make separate instances fo each command issued within the command group. We are using "AddSequential", and 3 commands that make our robot go forward, backward and then sideways (just for test purposes).

In our code we have a "DriveAuto" command that is parameterized and we pass in direction and time to drive for. It seemingly only runs the last command in the series. It had 3 calls to the DriveAuto, but each has the parameters of the last command in the command group.

It would appear as though the code is only creating one command in memory and the two subsequent calls (to the same function) are over-writing the first in memory.

In the code, we have a bunch of printf's and oddly, it never prints out anything from any of the calls to the constructors for the DriveAuto, which I expect shortly after it get's into autonomous.

Is it possible the code isnt inheriting write and over-riding the constructors - or we aren't instantiating the command group right?

Code is still https://github.com/team2053tigertronics/2015code
Reply With Quote