package com.qualcomm.ftcrobotcontroller.opmodes.custom.util;

import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.GyroSensor;

/**
 * Created by Peter on 2/29/16.
 */
public class GyroTest5421 extends OpMode {

    GyroSensor gyro;
    //DcMotor mL;
    //DcMotor mR;
    //Gamepad g1;

    @Override
    public void init() {
        gyro = hardwareMap.gyroSensor.get("gyro");
        gyro.calibrate();
        //mL = hardwareMap.dcMotor.get("mL");
        //mR = hardwareMap.dcMotor.get("mR");
        //mR.setDirection(DcMotor.Direction.REVERSE);
        //g1 = gamepad1;
    }

    @Override
    public void loop() {
        //double leftPower = g1.left_stick_y;
        //double rightPower = g1.right_stick_y;
        //mL.setPower(leftPower);
        //mR.setPower(rightPower);

        telemetry.addData("X-Y-Z-H", gyro.rawX() + "-" + gyro.rawY() + "-" + gyro.rawZ() + "-" + gyro.getHeading());
    }
}

@@ -499,120 +499,227 @@
  //m
-R = hardwareMap.dcMotor.get(%22mR%22);%0A        //mR.setDirection(DcMotor.Direction.REVERSE);%0A        //g1 = gamepad1
+L.setDirection(DcMotor.Direction.REVERSE);%0A        //mR = hardwareMap.dcMotor.get(%22mR%22);%0A        //g1 = gamepad1;%0A    %7D%0A%0A    public void init_loop() %7B%0A        telemetry.addData(%22GYRO CALIBRATING:%22, gyro.isCalibrating())
 ;%0A  
@@ -887,16 +887,20 @@
 eftPower
+*0.5
 );%0A     
@@ -926,16 +926,20 @@
 ghtPower
+*0.5
 );%0A%0A    
@@ -934,32 +934,34 @@
 *0.5);%0A%0A        
+//
 telemetry.addDat
@@ -1048,21 +1048,384 @@
 tHeading());
+%0A%0A        telemetry.addData(%221. x%22, String.format(%22%2503d%22, gyro.rawX()));%0A        telemetry.addData(%222. y%22, String.format(%22%2503d%22, gyro.rawY()));%0A        telemetry.addData(%223. z%22, String.format(%22%2503d%22, gyro.rawZ()));%0A        telemetry.addData(%224. h%22, String.format(%22%2503d%22, gyro.getHeading()));%0A        telemetry.addData(%225. t%22, String.format(%22%2505d%22, getRuntime()));
 %0A    %7D%0A%7D%0A

Add more functionality to gyro test