Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. package org.firstinspires.ftc.teamcode;
  2.  
  3. public class RobotHardware
  4. {
  5.     // public opMode members
  6.     public DcMotor leftFront, rightFront, leftBack, rightBack;
  7.  
  8.     // local opMode members
  9.     HardwareMap hwMap           =  null;
  10.     private ElapsedTime period  = new ElapsedTime();
  11.  
  12.     // empty class constructor
  13.     public RobotHardware() {
  14.  
  15.     }
  16.  
  17.     // initialize standard hardware interfaces
  18.     public void initi(HardwareMap ahwMap) {
  19.         /* initi()
  20.         @HardwareMap ahwMap: opMode hardware map to grab motor configurations from
  21.        
  22.         Method used to initialize drivetrain motors from a given
  23.         hardwareMap configuration*/
  24.  
  25.         // save reference to Hardware map
  26.         hwMap = ahwMap;
  27.  
  28.         // define and initialize motors for drivetrain
  29.         leftFront  = hwMap.get(DcMotor.class, "leftFront");
  30.         rightFront = hwMap.get(DcMotor.class, "rightFront");
  31.         leftBack   = hwMap.get(DcMotor.class, "leftBack");
  32.         rightBack  = hwMap.get(DcMotor.class, "rightBack");
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement