Added drivetrain motors
This commit is contained in:
@@ -1,14 +1,34 @@
|
|||||||
package org.firstinspires.ftc.teamcode.utils;
|
package org.firstinspires.ftc.teamcode.utils;
|
||||||
|
|
||||||
|
import com.qualcomm.robotcore.hardware.DcMotorEx;
|
||||||
|
import com.qualcomm.robotcore.hardware.DcMotorImplEx;
|
||||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||||
|
|
||||||
public class Robot {
|
public class Robot {
|
||||||
|
|
||||||
//Initialize Public Components
|
//Initialize Public Components
|
||||||
|
|
||||||
|
public DcMotorEx frontLeft;
|
||||||
|
public DcMotorEx frontRight;
|
||||||
|
|
||||||
|
public DcMotorEx backLeft;
|
||||||
|
|
||||||
|
public DcMotorEx backRight;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Robot (HardwareMap hardwareMap) {
|
public Robot (HardwareMap hardwareMap) {
|
||||||
|
|
||||||
//Define components w/ hardware map
|
//Define components w/ hardware map
|
||||||
|
|
||||||
|
frontLeft = hardwareMap.get(DcMotorEx.class, "fl");
|
||||||
|
frontRight = hardwareMap.get(DcMotorEx.class, "fr");
|
||||||
|
backLeft = hardwareMap.get(DcMotorEx.class, "bl");
|
||||||
|
backRight = hardwareMap.get(DcMotorEx.class, "br");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user