RIT VEXU Core API
Loading...
Searching...
No Matches
AutoChooser Class Reference

#include <auto_chooser.h>

Inheritance diagram for AutoChooser:
screen::Page

Classes

struct  entry_t
 

Public Member Functions

 AutoChooser (std::vector< std::string > paths, size_t def=0)
 
size_t get_choice ()
 

Protected Attributes

size_t choice
 
std::vector< entry_tlist
 

Detailed Description

Autochooser is a utility to make selecting robot autonomous programs easier source: RIT VexU Wiki During a season, we usually code between 4 and 6 autonomous programs. Most teams will change their entire robot program as a way of choosing autonomi but this may cause issues if you have an emergency patch to upload during a competition. This class was built as a way of using the robot screen to list autonomous programs, and the touchscreen to select them.

Constructor & Destructor Documentation

◆ AutoChooser()

AutoChooser::AutoChooser ( std::vector< std::string > paths,
size_t def = 0 )

Initialize the auto-chooser. This class places a choice menu on the brain screen, so the driver can choose which autonomous to run.

Parameters
brainthe brain on which to draw the selection boxes

Member Function Documentation

◆ get_choice()

size_t AutoChooser::get_choice ( )

Get the currently selected auto choice

Returns
the identifier to the auto path

Return the selected autonomous

Member Data Documentation

◆ choice

size_t AutoChooser::choice
protected

the current choice of auto

◆ list

std::vector<entry_t> AutoChooser::list
protected

< a list of all possible auto choices


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