** Function: setStartupApp ** Handles Menu to set startup app **********************************************************************/
| 1220 | ** Handles Menu to set startup app |
| 1221 | **********************************************************************/ |
| 1222 | void setStartupApp() { |
| 1223 | int idx = 0; |
| 1224 | if (bruceConfig.startupApp == "") idx = 0; |
| 1225 | |
| 1226 | options = { |
| 1227 | {"None", [=]() { bruceConfig.setStartupApp(""); }, bruceConfig.startupApp == ""} |
| 1228 | }; |
| 1229 | |
| 1230 | int index = 0; |
| 1231 | for (String appName : startupApp.getAppNames()) { |
| 1232 | index++; |
| 1233 | if (bruceConfig.startupApp == appName) idx = index; |
| 1234 | |
| 1235 | options.push_back({appName.c_str(), [=]() { |
| 1236 | bruceConfig.setStartupApp(appName); |
| 1237 | #if !defined(LITE_VERSION) && !defined(DISABLE_INTERPRETER) |
| 1238 | if (appName == "JS Interpreter") { |
| 1239 | options = getScriptsOptionsList("", true); |
| 1240 | loopOptions(options, MENU_TYPE_SUBMENU, "Startup Script"); |
| 1241 | } |
| 1242 | #endif |
| 1243 | }}); |
| 1244 | } |
| 1245 | |
| 1246 | loopOptions(options, idx); |
| 1247 | options.clear(); |
| 1248 | } |
| 1249 | |
| 1250 | /********************************************************************* |
| 1251 | ** Function: setGpsBaudrateMenu |
no test coverage detected