| 8 | #include "core/connect/serial_commands.h" |
| 9 | |
| 10 | void FileMenu::optionsMenu() { |
| 11 | options.clear(); |
| 12 | if (setupSdCard()) options.push_back({"SD Card", [=]() { loopSD(SD); }}); |
| 13 | options.push_back({"LittleFS", [=]() { loopSD(LittleFS); }}); |
| 14 | options.push_back({"WebUI", loopOptionsWebUi}); |
| 15 | |
| 16 | #if !defined(LITE_VERSION) |
| 17 | options.push_back({"Connect", [=]() { |
| 18 | std::vector<Option> connectOpts = { |
| 19 | {"Send File", [=]() { FileSharing().sendFile(); } }, |
| 20 | {"Recv File", [=]() { FileSharing().receiveFile(); } }, |
| 21 | {"Send Cmds", [=]() { EspSerialCmd().sendCommands(); } }, |
| 22 | {"Recv Cmds", [=]() { EspSerialCmd().receiveCommands(); }}, |
| 23 | {"Back", [=]() { optionsMenu(); } } |
| 24 | }; |
| 25 | loopOptions(connectOpts, MENU_TYPE_SUBMENU, "Connect"); |
| 26 | }}); |
| 27 | #endif |
| 28 | |
| 29 | #if defined(SOC_USB_OTG_SUPPORTED) |
| 30 | options.push_back({"Mass Storage", [=]() { MassStorage(); }}); |
| 31 | #endif |
| 32 | addOptionToMainMenu(); |
| 33 | |
| 34 | loopOptions(options, MENU_TYPE_SUBMENU, "Files"); |
| 35 | } |
| 36 | void FileMenu::drawIcon(float scale) { |
| 37 | clearIconArea(); |
| 38 | int iconW = scale * 32; |
nothing calls this directly
no test coverage detected