API Reference

namespace ms

Functions

void set_autons(const std::vector<Category> &categories)

Set the autons that will be displayed on the brain.

Parameters:

categories – A vector of Category that will be displayed

void call_selected_auton()

Call the callback of the currently selected Auton.

void initialize(int autons_per_row = 3)

Initialize the autonomous selector.

Parameters:

autons_per_row – The number of autons that can be displayed on each row, defaults to 3

class Auton

Public Functions

Auton(std::string name, const std::function<void()> &callback)

Construct a new Auton.

Parameters:
  • name – The name of the auton

  • callback – The callback associated with the auton (the function that will be called when auton is selected)

Public Members

std::string name

The name of the auton.

std::function<void()> callback

The callback associated with the auton.

class Category

Public Functions

Category(std::string name, const std::vector<Auton> &autons)

Construct a new Category in the autonomous selector.

Parameters:
  • name – The name of the category

  • autons – The autons that the category will contain

Public Members

std::string name

The name of the category.

std::vector<Auton> autons

The autons that the category contains.