pros namespace

LLEMU Conditional Include

When the libvgl versions of llemu.h is present, common.mk will
define a macro which lets this file know that liblvgl's llemu.h is
present. If it is, we conditionally include it so that it gets
included into api.h.

When the libvgl versions of llemu.hpp is present, common.mk will
define a macro which lets this file know that liblvgl's llemu.hpp is
present. If it is, we conditionally include it so that it gets
included into api.h.
LLEMU Weak Stubs
These functions allow main.cpp to be compiled without LVGL present

Namespaces

namespace adi
namespace battery
namespace c
namespace competition
namespace lcd
namespace literals
namespace rtos
namespace screen
namespace usd
namespace v5
namespace v5::literals

Classes

class v5::AbstractMotor
class v5::Controller
class v5::Device
class v5::Distance
class v5::Gps
class v5::Imu
class Link
class v5::Motor
class v5::MotorGroup
class Mutex
template<typename Var>
class MutexVar
template<typename Var>
class MutexVarLock
class v5::Optical
class v5::Rotation
class Serial
class Task
class v5::Vision

Functions

pros::LEGACY_TYPEDEF(ADIPort, pros::adi::Port)
pros::LEGACY_TYPEDEF(ADIAnalogIn, pros::adi::AnalogIn)
pros::LEGACY_TYPEDEF(ADIAnalogOut, pros::adi::AnalogOut)
pros::LEGACY_TYPEDEF(ADIDigitalIn, pros::adi::DigitalIn)
pros::LEGACY_TYPEDEF(ADIDigitalOut, pros::adi::DigitalOut)
pros::LEGACY_TYPEDEF(ADIMotor, pros::adi::Motor)
pros::LEGACY_TYPEDEF(ADIGyro, pros::adi::Gyro)
pros::LEGACY_TYPEDEF(ADIEncoder, pros::adi::Encoder)
pros::LEGACY_TYPEDEF(ADIUltrasonic, pros::adi::Ultrasonic)
pros::LEGACY_TYPEDEF(LED, pros::adi::Led)
pros::LEGACY_TYPEDEF(ADIPotentiometer, pros::adi::Potentiometer)
pros::LEGACY_TYPEDEF(ADILineSensor, pros::adi::LineSensor)
pros::LEGACY_TYPEDEF(ADILightSensor, pros::adi::LightSensor)
pros::LEGACY_TYPEDEF(ADIAccelerometer, pros::adi::Accelerometer)
pros::LEGACY_TYPEDEF(ADIButton, pros::adi::Button)
pros::LEGACY_TYPEDEF(ADIPneumatics, pros::adi::Pneumatics)
pros::LEGACY_TYPEDEF(ADILED, pros::adi::Led)
pros::LEGACY_TYPEDEF(ADILed, pros::adi::Led)
struct pros::__attribute__((__packed__)) gps_position_s

Typedefs

using task_t = void*
An opaque type that pontis to a task handle.
using task_fn_t = void(*)(void*)
A pointer to a task's function.
using mutex_t = void*
A mutex..

Enumerations

enum task_state_e_t { E_TASK_STATE_RUNNING = 0, E_TASK_STATE_READY, E_TASK_STATE_BLOCKED, E_TASK_STATE_SUSPENDED, E_TASK_STATE_DELETED, E_TASK_STATE_INVALID }
The state of a task.
enum notify_action_e_t { E_NOTIFY_ACTION_NONE, E_NOTIFY_ACTION_BITS, E_NOTIFY_ACTION_INCR, E_NOTIFY_ACTION_OWRITE, E_NOTIFY_ACTION_NO_OWRITE }
brief The action to take when a task is notified.

Enums

enum class MotorBrake { coast = 0, brake = 1, hold = 2, invalid = INT32_MAX }
enum class MotorEncoderUnits { degrees = 0, deg = 0, rotations = 1, counts = 2, invalid = INT32_MAX }
enum class MotorGears { ratio_36_to_1 = 0, red = ratio_36_to_1, rpm_100 = ratio_36_to_1, ratio_18_to_1 = 1, green = ratio_18_to_1, rpm_200 = ratio_18_to_1, ratio_6_to_1 = 2, blue = ratio_6_to_1, rpm_600 = ratio_6_to_1, invalid = INT32_MAX }
enum adi_potentiometer_type_e { E_ADI_POT_EDR = 0, E_ADI_POT_V2 }
enum class Color { alice_blue = 0x00F0F8FF, antique_white = 0x00FAEBD7, aqua = 0x0000FFFF, aquamarine = 0x007FFFD4, azure = 0x00F0FFFF, beige = 0x00F5F5DC, bisque = 0x00FFE4C4, black = 0x00000000, blanched_almond = 0x00FFEBCD, blue = 0x000000FF, blue_violet = 0x008A2BE2, brown = 0x00A52A2A, burly_wood = 0x00DEB887, cadet_blue = 0x005F9EA0, chartreuse = 0x007FFF00, chocolate = 0x00D2691E, coral = 0x00FF7F50, cornflower_blue = 0x006495ED, cornsilk = 0x00FFF8DC, crimson = 0x00DC143C, cyan = 0x0000FFFF, dark_blue = 0x0000008B, dark_cyan = 0x00008B8B, dark_goldenrod = 0x00B8860B, dark_gray = 0x00A9A9A9, dark_grey = dark_gray, dark_green = 0x00006400, dark_khaki = 0x00BDB76B, dark_magenta = 0x008B008B, dark_olive_green = 0x00556B2F, dark_orange = 0x00FF8C00, dark_orchid = 0x009932CC, dark_red = 0x008B0000, dark_salmon = 0x00E9967A, dark_sea_green = 0x008FBC8F, dark_slate_gray = 0x002F4F4F, dark_slate_grey = dark_slate_gray, dark_turquoise = 0x0000CED1, dark_violet = 0x009400D3, deep_pink = 0x00FF1493, deep_sky_blue = 0x0000BFFF, dim_gray = 0x00696969, dim_grey = dim_gray, dodger_blue = 0x001E90FF, fire_brick = 0x00B22222, floral_white = 0x00FFFAF0, forest_green = 0x00228B22, fuchsia = 0x00FF00FF, gainsboro = 0x00DCDCDC, ghost_white = 0x00F8F8FF, gold = 0x00FFD700, goldenrod = 0x00DAA520, gray = 0x00808080, grey = gray, green = 0x00008000, green_yellow = 0x00ADFF2F, honeydew = 0x00F0FFF0, hot_pink = 0x00FF69B4, indian_red = 0x00CD5C5C, indigo = 0x004B0082, ivory = 0x00FFFFF0, khaki = 0x00F0E68C, lavender = 0x00E6E6FA, lavender_blush = 0x00FFF0F5, lawn_green = 0x007CFC00, lemon_chiffon = 0x00FFFACD, light_blue = 0x00ADD8E6, light_coral = 0x00F08080, light_cyan = 0x00E0FFFF, light_goldenrod_yellow = 0x00FAFAD2, light_green = 0x0090EE90, light_gray = 0x00D3D3D3, light_grey = light_gray, light_pink = 0x00FFB6C1, light_salmon = 0x00FFA07A, light_sea_green = 0x0020B2AA, light_sky_blue = 0x0087CEFA, light_slate_gray = 0x00778899, light_slate_grey = light_slate_gray, light_steel_blue = 0x00B0C4DE, light_yellow = 0x00FFFFE0, lime = 0x0000FF00, lime_green = 0x0032CD32, linen = 0x00FAF0E6, magenta = 0x00FF00FF, maroon = 0x00800000, medium_aquamarine = 0x0066CDAA, medium_blue = 0x000000CD, medium_orchid = 0x00BA55D3, medium_purple = 0x009370DB, medium_sea_green = 0x003CB371, medium_slate_blue = 0x007B68EE, medium_spring_green = 0x0000FA9A, medium_turquoise = 0x0048D1CC, medium_violet_red = 0x00C71585, midnight_blue = 0x00191970, mint_cream = 0x00F5FFFA, misty_rose = 0x00FFE4E1, moccasin = 0x00FFE4B5, navajo_white = 0x00FFDEAD, navy = 0x00000080, old_lace = 0x00FDF5E6, olive = 0x00808000, olive_drab = 0x006B8E23, orange = 0x00FFA500, orange_red = 0x00FF4500, orchid = 0x00DA70D6, pale_goldenrod = 0x00EEE8AA, pale_green = 0x0098FB98, pale_turquoise = 0x00AFEEEE, pale_violet_red = 0x00DB7093, papay_whip = 0x00FFEFD5, peach_puff = 0x00FFDAB9, peru = 0x00CD853F, pink = 0x00FFC0CB, plum = 0x00DDA0DD, powder_blue = 0x00B0E0E6, purple = 0x00800080, red = 0x00FF0000, rosy_brown = 0x00BC8F8F, royal_blue = 0x004169E1, saddle_brown = 0x008B4513, salmon = 0x00FA8072, sandy_brown = 0x00F4A460, sea_green = 0x002E8B57, seashell = 0x00FFF5EE, sienna = 0x00A0522D, silver = 0x00C0C0C0, sky_blue = 0x0087CEEB, slate_blue = 0x006A5ACD, slate_gray = 0x00708090, slate_grey = slate_gray, snow = 0x00FFFAFA, spring_green = 0x0000FF7F, steel_blue = 0x004682B4, tan = 0x00D2B48C, teal = 0x00008080, thistle = 0x00D8BFD8, tomato = 0x00FF6347, turquoise = 0x0040E0D0, violet = 0x00EE82EE, wheat = 0x00F5DEB3, white = 0x00FFFFFF, white_smoke = 0x00F5F5F5, yellow = 0x00FFFF00, yellow_green = 0x009ACD32 }
Enum class of possible colors.
enum class DeviceType { none = 0, motor = 2, rotation = 4, imu = 6, distance = 7, radio = 8, vision = 11, adi = 12, optical = 16, gps = 20, serial = 129, undefined = 255 }
enum imu_status_e { E_IMU_STATUS_READY = 0, E_IMU_STATUS_CALIBRATING = 1, E_IMU_STATUS_ERROR = 0xFF }
enum imu_orientation_e { E_IMU_Z_UP = 0, E_IMU_Z_DOWN = 1, E_IMU_X_UP = 2, E_IMU_X_DOWN = 3, E_IMU_Y_UP = 4, E_IMU_Y_DOWN = 5, E_IMU_ORIENTATION_ERROR = 0xFF }
enum class ImuStatus { ready = 0, calibrating = 19, error = 0xFF }
enum link_type_e { E_LINK_RECIEVER = 0, E_LINK_TRANSMITTER, E_LINK_RX = E_LINK_RECIEVER, E_LINK_TX = E_LINK_TRANSMITTER }
enum motor_fault_e { 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 { 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 { E_MOTOR_BRAKE_COAST = 0, E_MOTOR_BRAKE_BRAKE = 1, E_MOTOR_BRAKE_HOLD = 2, E_MOTOR_BRAKE_INVALID = INT32_MAX }
enum motor_encoder_units_e { E_MOTOR_ENCODER_DEGREES = 0, E_MOTOR_ENCODER_ROTATIONS = 1, E_MOTOR_ENCODER_COUNTS = 2, E_MOTOR_ENCODER_INVALID = INT32_MAX }
enum motor_gearset_e { 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 }
enum text_format_e_t { E_TEXT_SMALL = 0, E_TEXT_MEDIUM, E_TEXT_LARGE, E_TEXT_MEDIUM_CENTER, E_TEXT_LARGE_CENTER }
enum last_touch_e_t { E_TOUCH_RELEASED = 0, E_TOUCH_PRESSED, E_TOUCH_HELD, E_TOUCH_ERROR }
enum vision_object_type { E_VISION_OBJECT_NORMAL = 0, E_VISION_OBJECT_COLOR_CODE = 1, E_VISION_OBJECT_LINE = 2 }
enum vision_zero { E_VISION_ZERO_TOPLEFT = 0, E_VISION_ZERO_CENTER = 1 }
enum lcd_text_align_e { LCD_TEXT_ALIGN_LEFT = 0, LCD_TEXT_ALIGN_CENTER = 1, LCD_TEXT_ALIGN_RIGHT = 2 }
Represents how to align the text in the LCD.

Typedefs

using MotorUnits = MotorEncoderUnits
using MotorGearset = MotorGears
using MotorCart = MotorGears
using MotorCartridge = MotorGears
using MotorGear = MotorGears
using gps_accel_s_t = struct gps_raw_s
using gps_gyro_s_t = struct gps_raw_s
using imu_gyro_s_t = struct imu_raw_s
using imu_accel_s_t = struct imu_raw_s
using IMU = Imu
using touch_event_cb_fn_t = void(*)()
using lcd_btn_cb_fn_t = void(*)(void)

Variables

gps_position_s_t
gps_status_s_t
gps_orientation_s_t
quaternion_s_t
euler_s_t
vision_signature_s_t
vision_object_s_t

Function documentation

pros::LEGACY_TYPEDEF(ADIPort, pros::adi::Port)

pros::LEGACY_TYPEDEF(ADIAnalogIn, pros::adi::AnalogIn)

pros::LEGACY_TYPEDEF(ADIAnalogOut, pros::adi::AnalogOut)

pros::LEGACY_TYPEDEF(ADIDigitalIn, pros::adi::DigitalIn)

pros::LEGACY_TYPEDEF(ADIDigitalOut, pros::adi::DigitalOut)

pros::LEGACY_TYPEDEF(ADIMotor, pros::adi::Motor)

pros::LEGACY_TYPEDEF(ADIGyro, pros::adi::Gyro)

pros::LEGACY_TYPEDEF(ADIEncoder, pros::adi::Encoder)

pros::LEGACY_TYPEDEF(ADIUltrasonic, pros::adi::Ultrasonic)

pros::LEGACY_TYPEDEF(ADIPotentiometer, pros::adi::Potentiometer)

pros::LEGACY_TYPEDEF(ADILineSensor, pros::adi::LineSensor)

pros::LEGACY_TYPEDEF(ADILightSensor, pros::adi::LightSensor)

pros::LEGACY_TYPEDEF(ADIAccelerometer, pros::adi::Accelerometer)

pros::LEGACY_TYPEDEF(ADIButton, pros::adi::Button)

pros::LEGACY_TYPEDEF(ADIPneumatics, pros::adi::Pneumatics)

pros::LEGACY_TYPEDEF(ADILED, pros::adi::Led)

pros::LEGACY_TYPEDEF(ADILed, pros::adi::Led)

Enum documentation

enum pros::motor_fault_e

Enumerators
E_MOTOR_FAULT_NO_FAULTS

No faults.

E_MOTOR_FAULT_MOTOR_OVER_TEMP

Analogous to motor_is_over_temp()

E_MOTOR_FAULT_DRIVER_FAULT

Indicates a motor h-bridge fault.

E_MOTOR_FAULT_OVER_CURRENT

Analogous to motor_is_over_current()

E_MOTOR_FAULT_DRV_OVER_CURRENT

Indicates an h-bridge over current.

enum pros::motor_flag_e

Enumerators
E_MOTOR_FLAGS_NONE

There are no flags raised.

E_MOTOR_FLAGS_BUSY

Cannot currently communicate to the motor.

E_MOTOR_FLAGS_ZERO_VELOCITY

Analogous to motor_is_stopped()

E_MOTOR_FLAGS_ZERO_POSITION

Analogous to motor_get_zero_position_flag()

enum pros::motor_brake_mode_e

Enumerators
E_MOTOR_BRAKE_COAST

Motor coasts when stopped, traditional behavior.

E_MOTOR_BRAKE_BRAKE

Motor brakes when stopped.

E_MOTOR_BRAKE_HOLD

Motor actively holds position when stopped.

E_MOTOR_BRAKE_INVALID

Invalid brake mode.

enum pros::motor_encoder_units_e

Enumerators
E_MOTOR_ENCODER_DEGREES

Position is recorded as angle in degrees as a floating point number.

E_MOTOR_ENCODER_ROTATIONS

Position is recorded as angle in rotations as a floating point number.

E_MOTOR_ENCODER_COUNTS

Position is recorded as raw encoder ticks as a whole number.

E_MOTOR_ENCODER_INVALID

Invalid motor encoder units.

enum pros::motor_gearset_e

Typedef documentation

typedef void(*pros::lcd_btn_cb_fn_t)(void)