Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.firstinspires.ftc.teamcode;
- public class RobotHardware
- {
- // public opMode members
- public DcMotor leftFront, rightFront, leftBack, rightBack;
- // local opMode members
- HardwareMap hwMap = null;
- private ElapsedTime period = new ElapsedTime();
- // empty class constructor
- public RobotHardware() {
- }
- // initialize standard hardware interfaces
- public void initi(HardwareMap ahwMap) {
- /* initi()
- @HardwareMap ahwMap: opMode hardware map to grab motor configurations from
- Method used to initialize drivetrain motors from a given
- hardwareMap configuration*/
- // save reference to Hardware map
- hwMap = ahwMap;
- // define and initialize motors for drivetrain
- leftFront = hwMap.get(DcMotor.class, "leftFront");
- rightFront = hwMap.get(DcMotor.class, "rightFront");
- leftBack = hwMap.get(DcMotor.class, "leftBack");
- rightBack = hwMap.get(DcMotor.class, "rightBack");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement