Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding templates #47

Open
TuskAct2 opened this issue May 6, 2023 · 0 comments
Open

Coding templates #47

TuskAct2 opened this issue May 6, 2023 · 0 comments

Comments

@TuskAct2
Copy link

TuskAct2 commented May 6, 2023

I think an excellent way to teach rookies wplib or at least the basic of it is to have code templates for example

Motors
CANSparkMax motor name = MotorControllerFactory.createSparkMax(motor port, MotorConfig.NEO);

RelariveEncoders
RelativeEncoder motor1Encoder = motor1.getEncoder();

SmartDashboard

SmartDashboard.putNumber("Name" variable you want);
SmartDashboard.getNumber("Name" variable you want);
SmartDashboard.boolean("Name" variable you want);

Another template that would be good is the getter methods

public String getName()
{
return name;
}

All of these would be in their respective sub-sections in the training doc.

Small things like this are what helped me understand code better and would build a better foundation for rookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant