LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
custom_selector.hpp File Reference

Minimal alternative to AutonSelector: name + function only, no banner / preview / PID panel. More...

#include <functional>
#include <string>
#include <vector>
#include "LightLib/main.h"

Go to the source code of this file.

Classes

struct  CustomAuton
 A bare-bones registered auton: just a name and a callback. More...
 

Functions

void display_splash (const char *mode)
 Render a splash banner showing the active mode.
 
void custom_selector_add (const std::string &name, std::function< void()> fn)
 Append a routine to the custom selector.
 
void custom_selector_init ()
 Build the custom selector UI.
 
int custom_selector_get ()
 
void custom_selector_run ()
 Invoke the currently selected custom auton (call from autonomous()).
 

Detailed Description

Minimal alternative to AutonSelector: name + function only, no banner / preview / PID panel.

Useful for projects that ship their own picker UI but still want a registry.

Definition in file custom_selector.hpp.

Function Documentation

◆ custom_selector_add()

void custom_selector_add ( const std::string &  name,
std::function< void()>  fn 
)

Append a routine to the custom selector.

Parameters
namedisplay name
fnroutine to invoke when selected

◆ custom_selector_get()

int custom_selector_get ( )
Returns
Index of the currently selected custom auton.

◆ custom_selector_init()

void custom_selector_init ( )

Build the custom selector UI.

Call once in initialize().

◆ custom_selector_run()

void custom_selector_run ( )

Invoke the currently selected custom auton (call from autonomous()).

◆ display_splash()

void display_splash ( const char *  mode)

Render a splash banner showing the active mode.

Parameters
modeshort mode string (e.g. "AUTON", "OPCONTROL")