Skip to content

getUserOption Documentation

Voidless7125 edited this page Sep 27, 2024 · 2 revisions

getUserOption()

Description

This function takes a setting name and values for that setting, prints them onto controller1, and asks for a selection.

Example use

void setup()
{
// Perfect setup
int value = getUserOption("very good setting", {"1", "2"})
if (value = 1)
{
// Do value 1
}
else
{
## Do other values}
}

Return Value

Returns what the user selected. (Ensure you are using the correct type when taking the data!)

Notes

You can change the max option size in the configManager The function cannot be run in competition mode; it is only at startup.

Clone this wiki locally