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

On-brain auton picker UI. More...

#include <auton_selector.hpp>

Public Member Functions

 ~AutonSelector ()
 
void add (const std::string &name, const std::string &desc, std::function< void()> fn)
 Register an autonomous routine.
 
void add (const std::string &name, const std::string &desc, std::function< void()> fn, const lv_img_dsc_t *banner)
 add() variant with a scrolling banner image shown inside the button.
 
void init ()
 Build the LVGL UI.
 
void run ()
 Invoke the currently selected routine (call from autonomous()).
 
void show ()
 Activate the picker screen.
 
int selected () const
 

Detailed Description

On-brain auton picker UI.

Singleton-style — use the global auton_selector instance. Holds the list of registered autons, manages the LVGL screen lifecycle, and exposes a compact PID-tuner side panel and live odom display.

Definition at line 35 of file auton_selector.hpp.

Constructor & Destructor Documentation

◆ ~AutonSelector()

light::AutonSelector::~AutonSelector ( )
inline

Definition at line 37 of file auton_selector.hpp.

Member Function Documentation

◆ add() [1/2]

void light::AutonSelector::add ( const std::string &  name,
const std::string &  desc,
std::function< void()>  fn 
)

Register an autonomous routine.

Parameters
namedisplay name on the picker button
descdescription shown in the side panel
fnfunction invoked when the routine is selected

◆ add() [2/2]

void light::AutonSelector::add ( const std::string &  name,
const std::string &  desc,
std::function< void()>  fn,
const lv_img_dsc_t *  banner 
)

add() variant with a scrolling banner image shown inside the button.

◆ init()

void light::AutonSelector::init ( )

Build the LVGL UI.

Call once in initialize().

◆ run()

void light::AutonSelector::run ( )

Invoke the currently selected routine (call from autonomous()).

◆ selected()

int light::AutonSelector::selected ( ) const
inline
Returns
Index of the currently selected auton.

Definition at line 65 of file auton_selector.hpp.

◆ show()

void light::AutonSelector::show ( )

Activate the picker screen.


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