pros/motors.h file

Contains prototypes for the V5 Motor-related functions.

Contents

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

Enums

enum motor_fault_e_t { E_MOTOR_FAULT_NO_FAULTS = 0x00, E_MOTOR_FAULT_MOTOR_OVER_TEMP = 0x01, E_MOTOR_FAULT_DRIVER_FAULT = 0x02, E_MOTOR_FAULT_OVER_CURRENT = 0x04, E_MOTOR_FAULT_DRV_OVER_CURRENT = 0x08 }
enum motor_flag_e_t { E_MOTOR_FLAGS_NONE = 0x00, E_MOTOR_FLAGS_BUSY = 0x01, E_MOTOR_FLAGS_ZERO_VELOCITY = 0x02, E_MOTOR_FLAGS_ZERO_POSITION = 0x04 }
enum motor_brake_mode_e_t { E_MOTOR_BRAKE_COAST = 0, E_MOTOR_BRAKE_BRAKE = 1, E_MOTOR_BRAKE_HOLD = 2, E_MOTOR_BRAKE_INVALID = INT32_MAX }
Indicates the current 'brake mode' of a motor.
enum motor_encoder_units_e_t { E_MOTOR_ENCODER_DEGREES = 0, E_MOTOR_ENCODER_ROTATIONS = 1, E_MOTOR_ENCODER_COUNTS = 2, E_MOTOR_ENCODER_INVALID = INT32_MAX }
Indicates the units used by the motor encoders.
enum motor_gearset_e_t { E_MOTOR_GEARSET_36 = 0, E_MOTOR_GEAR_RED = E_MOTOR_GEARSET_36, E_MOTOR_GEAR_100 = E_MOTOR_GEARSET_36, E_MOTOR_GEARSET_18 = 1, E_MOTOR_GEAR_GREEN = E_MOTOR_GEARSET_18, E_MOTOR_GEAR_200 = E_MOTOR_GEARSET_18, E_MOTOR_GEARSET_06 = 2, E_MOTOR_GEAR_BLUE = E_MOTOR_GEARSET_06, E_MOTOR_GEAR_600 = E_MOTOR_GEARSET_06, E_MOTOR_GEARSET_INVALID = INT32_MAX }
Indicates the current internal gear ratio of a motor.
enum motor_type_e_t { E_MOTOR_TYPE_V5 = 0, E_MOTOR_TYPE_EXP = 1, E_MOTOR_TYPE_INVALID = INT32_MAX }
Indicates the type of a motor.