Enums & Units

This page documents all enums and unit types used throughout the DishPy VEX Python SDK. These are used for specifying units, modes, and options for various API calls.


Ports

vex.Ports

Smartport definitions


Base Enum

vex.vexEnum

Base class for all enumerated types


Units

PercentUnits

vex.PercentUnits

The measurement units for percentage values.

PERCENT = PercentUnits(0, 'PERCENT')

A percentage unit that represents a value from 0% to 100%

TimeUnits

vex.TimeUnits

The measurement units for time values.

MSEC = TimeUnits(1, 'MSEC')

A time unit that is measured in milliseconds.

SEC = TimeUnits(0, 'SECONDS')

A time unit that is measured in seconds.

SECONDS = TimeUnits(0, 'SECONDS')

A time unit that is measured in seconds.

CurrentUnits

vex.CurrentUnits

The measurement units for current values.

AMP = CurrentUnits(0, 'AMP')

A current unit that is measured in amps.

VoltageUnits

vex.VoltageUnits

The measurement units for voltage values.

MV = VoltageUnits(0, 'mV')

A voltage unit that is measured in millivolts.

VOLT = VoltageUnits(0, 'VOLT')

A voltage unit that is measured in volts.

PowerUnits

vex.PowerUnits

The measurement units for power values.

WATT = PowerUnits(0, 'WATT')

A power unit that is measured in watts.

TorqueUnits

vex.TorqueUnits

The measurement units for torque values.

INLB = TorqueUnits(1, 'INLB')

A torque unit that is measured in Inch Pounds.

NM = TorqueUnits(0, 'NM')

A torque unit that is measured in Newton Meters.

RotationUnits

vex.RotationUnits

The measurement units for rotation values.

DEG = RotationUnits(0, 'DEG')

A rotation unit that is measured in degrees.

RAW = RotationUnits(99, 'RAW')

A rotation unit that is measured in raw data form.

REV = RotationUnits(1, 'REV')

A rotation unit that is measured in revolutions.

VelocityUnits

vex.VelocityUnits

The measurement units for velocity values.

DPS = VelocityUnits(2, 'DPS')

A velocity unit that is measured in degrees per second.

PERCENT = VelocityUnits(0, 'PCT')

A velocity unit that is measured in percentage.

RPM = VelocityUnits(1, 'RPM')

A velocity unit that is measured in rotations per minute.

DistanceUnits

vex.DistanceUnits

The measurement units for distance values.

CM = DistanceUnits(2, 'CM')

A distance unit that is measured in centimeters.

IN = DistanceUnits(1, 'IN')

A distance unit that is measured in inches.

MM = DistanceUnits(0, 'MM')

A distance unit that is measured in millimeters.

AnalogUnits

vex.AnalogUnits

The measurement units for analog values.

EIGHTBIT = AnalogUnits(0, '8BIT')

An analog unit that is measured in an 8-bit analog value (a value with 256 possible states).

MV = AnalogUnits(0, 'MV')

An analog unit that is measured in millivolts.

PCT = AnalogUnits(0, 'PCT')

An analog unit that is measured in percentage.

TENBIT = AnalogUnits(0, '10BIT')

An analog unit that is measured in an 10-bit analog value (a value with 1024 possible states).

TWELVEBIT = AnalogUnits(0, '12BIT')

An analog unit that is measured in an 12-bit analog value (a value with 4096 possible states).

TemperatureUnits

vex.TemperatureUnits

The measurement units for temperature values.

CELSIUS = TemperatureUnits(0, 'CELSIUS')

A temperature unit that is measured in celsius.

FAHRENHEIT = TemperatureUnits(0, 'FAHRENHEIT')

A temperature unit that is measured in fahrenheit.


Device & Control Enums

DirectionType

vex.DirectionType

The defined units for direction values.

FORWARD = DirectionType(0, 'FORWARD')

A direction unit that is defined as forward.

REVERSE = DirectionType(1, 'REVERSE')

A direction unit that is defined as backward.

UNDEFINED = DirectionType(2, 'UNDEFINED')

A direction unit used when direction is not known.

TurnType

vex.TurnType

Bases: vexEnum

The defined units for turn values.

LEFT = TurnType(0, 'LEFT')

A turn unit that is defined as left turning.

RIGHT = TurnType(1, 'RIGHT')

A turn unit that is defined as right turning.

UNDEFINED = TurnType(2, 'UNDEFINED')

A turn unit unit used when direction is not known.

BrakeType

vex.BrakeType

The defined units for motor brake values.

BRAKE = BrakeType(1, 'BRAKE')

A brake unit that is defined as motor brake.

COAST = BrakeType(0, 'COAST')

A brake unit that is defined as motor coast.

HOLD = BrakeType(2, 'HOLD')

A brake unit that is defined as motor hold.

GearSetting

vex.GearSetting

The defined units for gear values.

RATIO_18_1 = GearSetting(1, 'RATIO18_1')

A gear unit that is defined as the green 18:1 gear cartridge used in V5 Smart Motors.

RATIO_36_1 = GearSetting(0, 'RATIO36_1')

A gear unit that is defined as the red 36:1 gear cartridge used in V5 Smart Motors.

RATIO_6_1 = GearSetting(2, 'RATIO6_1')

A gear unit that is defined as the blue 6:1 gear cartridge used in V5 Smart Motors.

FontType

vex.FontType

A unit representing font type and size

CJK16 = FontType(10, 'CJK16')

Chinese/Japanese/Korean font of size 16

MONO12 = FontType(9, 'MONO12')

proportional font of size 12

MONO15 = FontType(8, 'MONO15')

proportional font of size 15

MONO20 = FontType(0, 'MONO20')

monotype font of size 20

MONO30 = FontType(1, 'MONO30')

monotype font of size 30

MONO40 = FontType(2, 'MONO40')

monotype font of size 40

MONO60 = FontType(3, 'MONO60')

monotype font of size 60

PROP20 = FontType(4, 'PROP20')

proportional font of size 20

PROP30 = FontType(5, 'PROP30')

proportional font of size 30

PROP40 = FontType(6, 'PROP40')

proportional font of size 40

PROP60 = FontType(7, 'PROP60')

proportional font of size 60

ThreeWireType

vex.ThreeWireType

The defined units for 3-wire devices.

ACCELEROMETER = ThreeWireType(9, 'ACCELEROMETER')

A 3-wire sensor that is defined as a accelerometer.

ANALOG_IN = ThreeWireType(0, 'ANALOG_IN')

A 3-wire sensor that is defined as an analog input.

ANALOG_OUT = ThreeWireType(1, 'ANALOG_OUT')

A 3-wire sensor that is defined as an analog output.

DIGITAL_IN = ThreeWireType(2, 'DIGITAL_IN')

A 3-wire sensor that is defined as an digital input.

DIGITAL_OUT = ThreeWireType(3, 'DIGITAL_OUT')

A 3-wire sensor that is defined as an digital output.

ENCODER = ThreeWireType(12, 'ENCODER')

A 3-wire sensor that is defined as a quadrature encoder.

GYRO = ThreeWireType(8, 'GYRO')

A 3-wire sensor that is defined as a yaw rate gyro.

LIGHT_SENSOR = ThreeWireType(7, 'LIGHT_SENSOR')

A 3-wire sensor that is defined as a light sensor.

LINE_SENSOR = ThreeWireType(6, 'LINE_SENSOR')

A 3-wire sensor that is defined as a line sensor.

MOTOR = ThreeWireType(10, 'MOTOR')

A 3-wire sensor that is defined as a legacy vex motor.

POTENTIOMETER = ThreeWireType(5, 'POT')

A 3-wire sensor that is defined as a potentiometer.

SERVO = ThreeWireType(11, 'SERVO')

A 3-wire sensor that is defined as a legacy vex servo.

SLEW_MOTOR = ThreeWireType(14, 'SLEW_MOTOR')

A 3-wire sensor that is defined as a legacy vex motor using slew rate control.

SONAR = ThreeWireType(13, 'SONAR')

A 3-wire sensor that is defined as an ultrasonic sensor (sonar)

SWITCH = ThreeWireType(4, 'BUTTON')

A 3-wire sensor that is defined as a switch.

ControllerType

vex.ControllerType

The defined types for controller devices.

PARTNER = ControllerType(1, 'PARTNER')

A controller defined as a partner controller.

PRIMARY = ControllerType(0, 'PRIMARY')

A controller defined as a primary controller.

AxisType

vex.AxisType

The defined units for inertial sensor axis.

XAXIS = AxisType(0, 'XAXIS')

The X axis of the Inertial sensor.

YAXIS = AxisType(1, 'YAXIS')

The Y axis of the Inertial sensor.

ZAXIS = AxisType(2, 'ZAXIS')

The Z axis of the Inertial sensor.

OrientationType

vex.OrientationType

The defined units for inertial sensor orientation.

PITCH = OrientationType(1, 'PITCH')

pitch, orientation around the Y axis of the Inertial sensor.

ROLL = OrientationType(0, 'ROLL')

roll, orientation around the X axis of the Inertial sensor.

YAW = OrientationType(2, 'YAW')

yaw, orientation around the Z axis of the Inertial sensor.

ObjectSizeType

vex.ObjectSizeType

The defined units for distance sensor object size.

LedStateType

vex.LedStateType

The defined units for optical sensor led state.

GestureType

vex.GestureType

The defined units for optical sensor gesture types.

VexlinkType

vex.VexlinkType

The defined units for vexlink types.

GENERIC = VexlinkType(3, 'GENERIC')

A vexlink type that is defined as a raw unmanaged link.

MANAGER = VexlinkType(1, 'MANAGER')

A vexlink type that is defined as the manager radio.

WORKER = VexlinkType(2, 'WORKER')

A vexlink type that is defined as the worker radio.

EventMask

vex.EventMask