pub struct AdiGyro { /* private fields */ }
Expand description

A struct which represents a V5 ADI port configured to be an ADI gyro.

Implementations

Initializes a gyroscope on the given port. If the given port has not previously been configured as a gyro, then this function starts a 1300 ms calibration period.

Safety

This function is unsafe because it allows the user to create multiple mutable references to the same ADI gyro. You likely want to implement Robot::new() instead.

Resets the gyroscope value to zero.

Gets the current gyro angle in tenths of a degree. Unless a multiplier is applied to the gyro, the return value will be a whole number representing the number of degrees of rotation times 10. There are 360 degrees in a circle, thus the gyro will return 3600 for one whole rotation.

Trait Implementations

Executes the destructor for this type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.