pros/rotation.h file

Contents

Contains prototypes for functions related to the VEX Rotation Sensor.

This file should not be modified by users, since it gets replaced whenever a kernel upgrade occurs.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Namespaces

namespace pros
LLEMU Conditional Include
namespace pros::c

Functions

int32_t rotation_reset(uint8_t port)
Reset Rotation Sensor.
int32_t rotation_set_data_rate(uint8_t port, uint32_t rate)
Set the Rotation Sensor's refresh interval in milliseconds.
int32_t rotation_set_position(uint8_t port, uint32_t position)
Set the Rotation Sensor position reading to a desired rotation value.
int32_t rotation_reset_position(uint8_t port)
Reset the Rotation Sensor position to 0.
int32_t rotation_get_position(uint8_t port)
Get the Rotation Sensor's current position in centidegrees.
int32_t rotation_get_velocity(uint8_t port)
Get the Rotation Sensor's current velocity in centidegrees per second.
int32_t rotation_get_angle(uint8_t port)
Get the Rotation Sensor's current angle in centidegrees (0-36000)
int32_t rotation_set_reversed(uint8_t port, bool value)
Set the Rotation Sensor's direction reversed flag.
int32_t rotation_reverse(uint8_t port)
Reverse the Rotation Sensor's direction.
int32_t rotation_init_reverse(uint8_t port, bool reverse_flag)
Initialize the Rotation Sensor with a reverse flag.
int32_t rotation_get_reversed(uint8_t port)
Get the Rotation Sensor's reversed flag.

Defines

#define ROTATION_MINIMUM_DATA_RATE