pros::v5::Device class

Derived classes

class Distance
class Gps
class Imu
class Motor
class Optical
class Rotation
class Vision

Public static functions

static pros::DeviceType get_plugged_type(std::uint8_t port)
Gets the type of device on a given port.
static std::vector<Device> get_all_devices(pros::DeviceType device_type = pros::DeviceType::undefined)
Gets all devices of a given device type.

Constructors, destructors, conversion operators

Device(const std::uint8_t port) explicit
Creates a Device object.

Public functions

std::uint8_t get_port(void) const
Gets the port number of the Smart Device.
bool is_installed() virtual
Checks if the device is installed.
pros::DeviceType get_plugged_type() const
Gets the type of device.