Got PrototypeBot driving*

This commit is contained in:
2023-09-28 20:59:13 -05:00
parent 56ac5882ff
commit 3e88daee57
2 changed files with 6 additions and 2 deletions

View File

@@ -37,8 +37,11 @@ public class PrototypeRobot extends Robot {
backLeft = new MotorEx(hardwareMap, "backLeft");
//IMU
imu = hardwareMap.get(RevIMU.class, "imu");
imu.init(new BNO055IMU.Parameters());
imu = new RevIMU(hardwareMap, "imu");
BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();
parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;
parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;
imu.init(parameters);
// input motors exactly as shown below
xDrive = new HDrive(frontLeft, frontRight,

View File

@@ -12,6 +12,7 @@ public class PrototypeRobotEngine extends CyberarmEngine {
@Override
public void setup() {
this.robot = new PrototypeRobot("Hello World");
this.robot.setup();
addState(new PrototypeRobotDrivetrainState(robot));
}