View Single Post
  #1   Spotlight this post!  
Unread 04-24-2016, 09:34 AM
buckskinner1776 buckskinner1776 is offline
Registered User
FRC #3098
 
Join Date: Jan 2015
Location: Waterford
Posts: 7
buckskinner1776 is an unknown quantity at this point
JAVA Command Group Question

We have been using JAVA for a couple of years now and each year have had issues with the command groups. Previously, for the most part, sequential commands have worked fine but parallel commands have had hit and miss success. We've been through the manuals repeatedly without any success in clearing up the issues.

This year it's been a little better but we just ran into an issue that makes me wonder if it isn't what we were seeing before.

We have a number of commands added sequentially in a command group. These commands for the most part run fine. The problem we get to is when the output of one command is used in a subsequent command. We might initialize the robot with a robot.drivedistance variable initialized to 10". The first command in the command group may set the robot.drivedistance to 100". Then a command further down in the command group is passed this distance such as driveRobotForDistance(robot.drivedistance, fullspeed). This command seems to execute with the initial 10" instead of the 100".

Can anyone explain why? We can hardcode the 100" into driveRobotForDistance(100,fullsspeed) and it works just fine.
Reply With Quote