Hey so our team just switched from using command based programming to timed robot (java). We have working drive code, but I am having issues when trying to program a button to run an individual motor (our transfer system in this case). We have a “subsystem” that defines the motor controller and a few methods with the speed outputs and in Robot.java in teleopPereodic() I use if else to connect the button with the method. When I type if (X()) { transferMoveF(); } else { transferStop(); } , it shows errors on the methods and it says that it cannot find the method even though I imported the subsystem. The methods in the subsystem are public so it should see them. How do I fix this? (btw I would put the actual sections of code here but i’m not sure how to do that so it pops up in that window, how do I do that?)
Did you create a new subsystem object? should be something like
Subsystem name = new Subsystem(parameters);
no would I put that in Robot.java and what would go in the parameters?
He mentioned they switched AWAY from command-based, so no actual subsystems available
The best way to share your code is by sharing a link to github (or another public git repository service, like bitbucket or gitlab)
Is it a public class?
We do have a repository in github but we got a new programming computer and I have never set up the thing in vs code to push code to the repository and when I tried it would not push but i’m getting that figured out with somebody tomorrow. So no code in the repository.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.