Skip to content

Coding templates #47

@TuskAct2

Description

@TuskAct2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions