I’m programming my FTC robot using blocks, I have the code that moves my base and it goes along with other functions such as closing and opening my claw, moving my viper, but when I activate my collection automation function, my base stops moving, I’ve already tried using the function to move the base with my automation, but my robot continues moving in the last direction before pressing the button, does anyone know how to solve this?
Whenever you use delay, it pauses the entire robot program. By using if statements and timers, you can avoid pausing the program, assuming this is your issue.
Edit: I would recommend having one main loop that calls your subsystem methods, and in each of those having a state machine. This lets you specify conditions for when to trigger different actions and drivetrain modes more easily. I recommend reading this article from gm0 about state machines.
You’ll want to make a finite state machine.
Rather than having your whole robot wait on your collection automation, you’ll need to continuously check if [x time] has elapsed while also continuously updating your drivetrain from the joysticks.
You can definitely accomplish this using Blocks; you’ll likely need to make some additional variables to track the state of your collector.