| 11 | #include <globals.h> |
| 12 | |
| 13 | void BleMenu::optionsMenu() { |
| 14 | options.clear(); |
| 15 | #if !defined(LITE_VERSION) |
| 16 | if (BLEConnected) { |
| 17 | options.push_back({"Disconnect", [=]() { |
| 18 | #if defined(CONFIG_IDF_TARGET_ESP32C5) |
| 19 | esp_bt_controller_deinit(); |
| 20 | #else |
| 21 | BLEDevice::deinit(); |
| 22 | #endif |
| 23 | BLEConnected = false; |
| 24 | delete hid_ble; |
| 25 | hid_ble = nullptr; |
| 26 | if (_Ask_for_restart == 1) _Ask_for_restart = 2; |
| 27 | }}); |
| 28 | } |
| 29 | #endif |
| 30 | #if !defined(LITE_VERSION) |
| 31 | options.push_back({"Media Cmds", [=]() { MediaCommands(hid_ble, true); }}); |
| 32 | options.push_back({"BLE Scan", ble_scan}); |
| 33 | options.push_back({"iBeacon", [=]() { |
| 34 | ibeacon("Bruce", "e4c159a0-8c82-11e6-bdf4-0800200c9a66", 0x004C); |
| 35 | }}); |
| 36 | options.push_back({"Bad BLE", [=]() { ducky_setup(hid_ble, true); }}); |
| 37 | options.push_back({"BLE Keyboard", [=]() { ducky_keyboard(hid_ble, true); }}); |
| 38 | #endif |
| 39 | options.push_back({"BLE Spam", [=]() { spamMenu(); }}); |
| 40 | |
| 41 | #if !defined(LITE_VERSION) |
| 42 | options.push_back({"BLE Suite", [=]() { BleSuiteMenu(); }}); |
| 43 | options.push_back({"Ninebot", [=]() { BLENinebot(); }}); |
| 44 | #endif |
| 45 | addOptionToMainMenu(); |
| 46 | |
| 47 | loopOptions(options, MENU_TYPE_SUBMENU, "Bluetooth", 0, false); |
| 48 | } |
| 49 | |
| 50 | void BleMenu::drawIcon(float scale) { |
| 51 | clearIconArea(); |
nothing calls this directly
no test coverage detected