firmware/src/input
HarukiToreda 1c54388bb8
Toggle Bluetooth with Fn+b shortcut (#4977)
* Toggle Blutooth with Fn+b shortcut

Problem:
As many are aware, ESP32 devices are known for their high power consumption. For instance, the Heltec ESP32 V3 draws around 110mA when powered on with the screen active and connected to a phone via Bluetooth. The Bluetooth radio alone is responsible for approximately 50mA of that consumption. For keyboard-based standalone devices, which rarely need Bluetooth other than for changing settings, users were forced to keep Bluetooth on regardless of necessity. There was no way to toggle Bluetooth on or off without physically connecting the device to a computer via serial or using the admin channel, which required another node for access.

Solution:
I implemented a new feature that allows users to turn off Bluetooth on keyboard devices by pressing Fn+b and turn it back on when needed. This enhancement significantly improves power efficiency for these devices.

Result:
With Bluetooth off, the device now consumes only 55mA. When combined with Power Save mode, the consumption can drop as low as 11mA, a substantial reduction from the previous 110mA. Users can still easily reconnect to a phone using the shortcut when necessary, offering greater flexibility and extended battery life.

* Remove 1 reboot at least.

I was able to prevent a reboot using the disableBluetooth(); command, current tested at 47-55mA, it doesn't require a reboot to turn off, but it does need reboot to turn back on.

* Update CannedMessageModule.cpp
2024-10-07 15:16:10 -05:00
..
BBQ10Keyboard.cpp Try manual scancode for SYM 2023-08-22 11:23:19 +02:00
BBQ10Keyboard.h Try manual scancode for SYM 2023-08-22 11:23:19 +02:00
cardKbI2cImpl.cpp Tidier macros 2024-09-24 00:25:43 +12:00
cardKbI2cImpl.h fix for MESHTASTIC_EXCLUDE_INPUTBROKER 2024-06-17 20:17:56 +02:00
ExpressLRSFiveWay.cpp Refactor and consolidate time window logic (#4826) 2024-09-23 08:58:14 -05:00
ExpressLRSFiveWay.h Radio Master Joystick (#4476) 2024-08-17 05:51:53 -05:00
InputBroker.cpp fix for MESHTASTIC_EXCLUDE_INPUTBROKER 2024-06-17 20:17:56 +02:00
InputBroker.h Toggle Bluetooth with Fn+b shortcut (#4977) 2024-10-07 15:16:10 -05:00
kbI2cBase.cpp Toggle Bluetooth with Fn+b shortcut (#4977) 2024-10-07 15:16:10 -05:00
kbI2cBase.h Try manual scancode for SYM 2023-08-22 11:23:19 +02:00
kbMatrixBase.cpp fix building for other platforms 2023-08-07 19:57:47 +02:00
kbMatrixBase.h Let's see what this breaks... 2023-08-07 19:34:42 +02:00
kbMatrixImpl.cpp fix building for other platforms 2023-08-07 19:57:47 +02:00
kbMatrixImpl.h Let's see what this breaks... 2023-08-07 19:34:42 +02:00
LinuxInput.cpp Move defines to input broker 2024-09-06 11:54:31 +02:00
LinuxInput.h Native: fail-safes for simulated node without config file (#3486) 2024-03-24 13:42:32 -05:00
LinuxInputImpl.cpp Portduino work (#3049) 2024-01-12 02:00:31 -06:00
LinuxInputImpl.h Portduino work (#3049) 2024-01-12 02:00:31 -06:00
RotaryEncoderInterruptBase.cpp remove logging from int handler (#3242) 2024-02-17 13:25:57 -06:00
RotaryEncoderInterruptBase.h woops 2023-03-12 20:20:55 +01:00
RotaryEncoderInterruptImpl1.cpp Gps cleanup and powersave (#2807) 2023-09-23 23:45:35 -05:00
RotaryEncoderInterruptImpl1.h Gps cleanup and powersave (#2807) 2023-09-23 23:45:35 -05:00
ScanAndSelect.cpp Refactor and consolidate time window logic (#4826) 2024-09-23 08:58:14 -05:00
ScanAndSelect.h "Scan and Select" input for Canned Messages (#4365) 2024-08-06 17:16:56 -05:00
SerialKeyboard.cpp Refactor and consolidate time window logic (#4826) 2024-09-23 08:58:14 -05:00
SerialKeyboard.h Adding support for Chatter keypad (#4022) 2024-07-31 07:38:21 -05:00
SerialKeyboardImpl.cpp Trunk fmt 2024-07-31 07:42:23 -05:00
SerialKeyboardImpl.h Adding support for Chatter keypad (#4022) 2024-07-31 07:38:21 -05:00
TouchScreenBase.cpp T-Watch fixes 2023-08-08 18:06:39 +02:00
TouchScreenBase.h Enable compiling with gccnoneeabi 12.3.1 for nRF52 targets, additional small fixes (#3778) 2024-05-03 15:49:22 -05:00
TouchScreenImpl1.cpp t-watch-updates: Add canned message free text via touch keyboard and watch face frames to T-Watch S3 (#3941) 2024-05-23 07:21:27 -05:00
TouchScreenImpl1.h T deck: support keyboard, trackball and touchscreen (#2665) 2023-07-30 07:51:26 -05:00
TrackballInterruptBase.cpp fix T-Deck trackball crashes (#2714) 2023-08-12 19:44:05 -05:00
TrackballInterruptBase.h fix T-Deck trackball crashes (#2714) 2023-08-12 19:44:05 -05:00
TrackballInterruptImpl1.cpp T deck: support keyboard, trackball and touchscreen (#2665) 2023-07-30 07:51:26 -05:00
TrackballInterruptImpl1.h T deck: support keyboard, trackball and touchscreen (#2665) 2023-07-30 07:51:26 -05:00
UpDownInterruptBase.cpp fix upDown ISR (#3612) 2024-04-14 08:11:22 -05:00
UpDownInterruptBase.h fix upDown ISR (#3612) 2024-04-14 08:11:22 -05:00
UpDownInterruptImpl1.cpp Gps cleanup and powersave (#2807) 2023-09-23 23:45:35 -05:00
UpDownInterruptImpl1.h Gps cleanup and powersave (#2807) 2023-09-23 23:45:35 -05:00