| 192 | } |
| 193 | |
| 194 | void settings_menu() { |
| 195 | int idx = 0; |
| 196 | returnToMenu = false; |
| 197 | while (idx >= 0 && !returnToMenu) { |
| 198 | options = { |
| 199 | #ifndef E_PAPER_DISPLAY |
| 200 | {"Charge Mode", |
| 201 | [=]() { |
| 202 | chargeMode(); |
| 203 | returnToMenu = true; |
| 204 | } }, |
| 205 | #endif |
| 206 | {"Brightness", |
| 207 | [=]() { |
| 208 | setBrightnessMenu(); |
| 209 | saveConfigs(); |
| 210 | } }, |
| 211 | {"Dim time", |
| 212 | [=]() { |
| 213 | setdimmerSet(); |
| 214 | saveConfigs(); |
| 215 | } }, |
| 216 | #if !defined(E_PAPER_DISPLAY) |
| 217 | {"UI Color", |
| 218 | [=]() { |
| 219 | setUiColor(); |
| 220 | saveConfigs(); |
| 221 | } }, |
| 222 | #endif |
| 223 | #if !defined(LYLYGO_TDECK_PRO) |
| 224 | {"Orientation", [=]() { |
| 225 | gsetRotation(true); |
| 226 | saveConfigs(); |
| 227 | }} |
| 228 | #endif |
| 229 | }; |
| 230 | if (sdcardMounted) { |
| 231 | options.push_back({onlyBins ? "[ ] See All Files" : "[x] See All Files", [=]() { |
| 232 | onlyBins = !onlyBins; |
| 233 | saveConfigs(); |
| 234 | }}); |
| 235 | options.push_back({noDotFiles ? "[ ] Show Dotfiles" : "[x] Show Dotfiles", [=]() { |
| 236 | noDotFiles = !noDotFiles; |
| 237 | saveConfigs(); |
| 238 | }}); |
| 239 | } |
| 240 | |
| 241 | options.push_back({bootToApp ? "[ ] Boot to Launcher" : "[x] Boot to Launcher", [=]() { |
| 242 | bootToApp = !bootToApp; |
| 243 | saveConfigs(); |
| 244 | }}); |
| 245 | options.push_back({askSpiffs ? "[x] Ask to copy SPIFFS" : "[ ] Ask to copy SPIFFS", [=]() { |
| 246 | askSpiffs = !askSpiffs; |
| 247 | saveConfigs(); |
| 248 | }}); |
| 249 | options.push_back({"Partition Manager", [=]() { partList(); }}); |
| 250 | |
| 251 | if (MAX_SPIFFS > 0) |
no test coverage detected