You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where we want to produce a ppl command (for a dynamic path from points that are not previously known) in the initialization method of one of our commands, how should we best execute that command. We started with:
ourCmd {
initialization() {
make points;
make path;
cmd = AutoBuilder.followPath(path);
cmd.schedule();
}
end(...) {
cmd.cancel();
}
}
we the bind:
joystick.a().whileTrue(new ourCmd());
Which worked for a while, but after a number of updates fails to call end() when button A is released. The followPath command will run to completion regardless of releasing the button. This is not good for testing when things go awry.
So we have shifted to:
This works, but... I feel that there should be some better way. I don't see an AutoBuilder.followPath(Supplier) method.
What is the best practice for doing this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In cases where we want to produce a ppl command (for a dynamic path from points that are not previously known) in the initialization method of one of our commands, how should we best execute that command. We started with:
Which worked for a while, but after a number of updates fails to call end() when button A is released. The followPath command will run to completion regardless of releasing the button. This is not good for testing when things go awry.
So we have shifted to:
This works, but... I feel that there should be some better way. I don't see an AutoBuilder.followPath(Supplier) method.
What is the best practice for doing this.
Thanks,
Rich
Beta Was this translation helpful? Give feedback.
All reactions