pros::v5::Device class

Derived classes

class v5::Distance
class v5::Gps
class v5::Imu
class v5::Motor
class v5::Optical
class v5::Rotation
class v5::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.