MCPcopy Create free account
hub / github.com/BruceDevices/firmware / optionsMenu

Method optionsMenu

src/core/menu_items/BleMenu.cpp:13–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <globals.h>
12
13void 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
50void BleMenu::drawIcon(float scale) {
51 clearIconArea();

Callers

nothing calls this directly

Calls 10

MediaCommandsFunction · 0.85
ibeaconFunction · 0.85
ducky_setupFunction · 0.85
ducky_keyboardFunction · 0.85
spamMenuFunction · 0.85
BleSuiteMenuFunction · 0.85
BLENinebotClass · 0.85
addOptionToMainMenuFunction · 0.85
loopOptionsFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected