class
#include <pros/misc.hpp>
Controller
Constructors, destructors, conversion operators
- Controller(controller_id_e_t id) explicit
- Creates a controller object for the given controller id.
Public functions
- std::int32_t is_connected(void)
- Checks if the controller is connected.
- std::int32_t get_analog(controller_analog_e_t channel)
- Gets the value of an analog channel (joystick) on a controller.
- std::int32_t get_battery_capacity(void)
- Gets the battery capacity of the controller.
- std::int32_t get_battery_level(void)
- Gets the battery level of the controller.
- std::int32_t get_digital(controller_digital_e_t button)
- Checks if a digital channel (button) on the controller is currently pressed.
- std::int32_t get_digital_new_press(controller_digital_e_t button)
- Returns a rising-edge case for a controller button press.
-
template<typename T>T convert_args(T arg)
- const char* convert_args(const std::string& arg)
-
template<typename... Params>std::int32_t print(std::uint8_t line, std::uint8_t col, const char* fmt, Params... args)
- Sets text to the controller LCD screen.
- std::int32_t set_text(std::uint8_t line, std::uint8_t col, const char* str)
- Sets text to the controller LCD screen.
- std::int32_t set_text(std::uint8_t line, std::uint8_t col, const std::string& str)
- std::int32_t clear_line(std::uint8_t line)
- Clears an individual line of the controller screen.
- std::int32_t rumble(const char* rumble_pattern)
- Rumble the controller.
- std::int32_t clear(void)
- Clears all of the lines on the controller screen.