RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::ProsController Class Referencefinal

The master or partner V5 controller, read through PROS. More...

#include <ProsController.hpp>

Inheritance diagram for rz::ProsController:
rz::Controller rz::Component

Public Types

enum class  Id { Master , Partner }
Public Types inherited from rz::Controller
enum class  Stick : std::uint8_t { LeftX , LeftY , RightX , RightY }
enum class  Button : std::uint8_t {
  L1 , L2 , R1 , R2 ,
  Up , Down , Left , Right ,
  X , B , Y , A
}

Public Member Functions

 ProsController (Id id)
Public Member Functions inherited from rz::Controller
double stick (Stick stick) const
 How far the stick is pushed, from -1 to 1. Right and up are positive.
bool held (Button button) const
 Whether the button is down.
bool pressed (Button button) const
 Whether the button went down this tick.
bool connected () const
Task nextPress (Button button)
 Waits for the next press of button, in a later tick than this one. Checked at estimatorsUpdated.
Public Member Functions inherited from rz::Component
 Component (const Component &)=delete
Component & operator= (const Component &)=delete
 Component (Component &&)=delete
Component & operator= (Component &&)=delete
virtual ~Component ()
std::string_view name () const noexcept
 Used in log and error messages.

Additional Inherited Members

Static Public Member Functions inherited from rz::Component
static Task runAll ()
 Runs the loop of every component constructed so far, in construction order, until cancelled. rz::robot runs it; tests without rz::robot run it alongside their script.
Static Public Attributes inherited from rz::Controller
static constexpr std::size_t STICK_COUNT = 4
static constexpr std::size_t BUTTON_COUNT = 12
Protected Member Functions inherited from rz::Controller
 Controller (std::string_view name)
Protected Member Functions inherited from rz::Component
 Component (std::string_view name)

Detailed Description

The master or partner V5 controller, read through PROS.

Member Enumeration Documentation

◆ Id

enum class rz::ProsController::Id
strong
Enumerator
Master 
Partner 

Constructor & Destructor Documentation

◆ ProsController()

rz::ProsController::ProsController ( Id id)
explicit

The documentation for this class was generated from the following file: