Class FriendlyIMUImpl
java.lang.Object
org.firstinspires.ftc.teamcode.fy23.robot.subsystems.normalimpl.FriendlyIMUImpl
- All Implemented Interfaces:
FriendlyIMU
A normal implementation of
FriendlyIMU.
The IMU is read each time you call a method. Values are always current (and it's not reading the IMU when you
don't need it to).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firstinspires.ftc.teamcode.fy23.robot.subsystems.FriendlyIMU
FriendlyIMU.Parameters -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFriendlyIMUImpl(FriendlyIMU.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap) -
Method Summary
Modifier and TypeMethodDescriptiondoublepitch()X rotationdoublepitch(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) X rotationdoublepitchVel()Velocity of X rotationdoublepitchVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of X rotationdoubleroll()Y rotationdoubleroll(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Y rotationdoublerollVel()Velocity of Y rotationdoublerollVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of Y rotationvoidupdate()Called by robot.update().doubleyaw()Z rotationdoubleyaw(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Z rotationdoubleyawVel()Velocity of Z rotationdoubleyawVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) Velocity of Z rotation
-
Field Details
-
imu
public com.qualcomm.robotcore.hardware.IMU imu
-
-
Constructor Details
-
FriendlyIMUImpl
public FriendlyIMUImpl(FriendlyIMU.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
-
-
Method Details
-
pitch
public double pitch()Description copied from interface:FriendlyIMUX rotation- Specified by:
pitchin interfaceFriendlyIMU
-
pitchVel
public double pitchVel()Description copied from interface:FriendlyIMUVelocity of X rotation- Specified by:
pitchVelin interfaceFriendlyIMU
-
roll
public double roll()Description copied from interface:FriendlyIMUY rotation- Specified by:
rollin interfaceFriendlyIMU
-
rollVel
public double rollVel()Description copied from interface:FriendlyIMUVelocity of Y rotation- Specified by:
rollVelin interfaceFriendlyIMU
-
yaw
public double yaw()Description copied from interface:FriendlyIMUZ rotation- Specified by:
yawin interfaceFriendlyIMU
-
yawVel
public double yawVel()Description copied from interface:FriendlyIMUVelocity of Z rotation- Specified by:
yawVelin interfaceFriendlyIMU
-
update
public void update()Description copied from interface:FriendlyIMUCalled by robot.update(). You do not need to call this method.- Specified by:
updatein interfaceFriendlyIMU
-