-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update BleKeyboard.cpp #54
base: master
Are you sure you want to change the base?
Conversation
Edited BleKeyboard::begin and BleKeyboard::end to be able to delete the Task when stopping BleKeyboard
Thanks for your contribution. However, I would like to get #53 merged first and from what I recall it removes the xTaskCreate. I think with #53 merged the memory footprint will be greatly reduced and thus you should be able to run a webserver in parallel without having to end the BleKeyboard instance. |
I can at least test it for you on Mac. I reduced the STACK_SIZE to about 2500 but is still wasn't good enough. That is why I create the vTaskDelete. In my case in doesn't matter because when the AsyncWebServer is started, I do not need BLE until I restart. |
Was 20000, now it is 4096.
Defined BLE_KEYBOARD_VERSION "1.1" for debugging purposes.
I have changed the task size to 4096. 20000 was quite big. Haven't had issues since. I also included BLE_KEYBOARD_VERSION "1.1" (Which off course can be any version number) for debugging purposes. |
Thanks for the efforts and I have tested without issues on PC, Android. However, can someone suggest how to convert this to classic BT instead of BLE environment please? I am a volunteer worker teaching remote region juniors to make fun projects, To cut the story short, the facility only equipped with outdated computers (BT2.0) , no BLE. |
No it can't be converted. Maybe if you work at espressif. |
Renaming NUMLOCK keys for consistency
Version 1.3
To Dustin Watts, thanks for posting this - it solved a problem I have been working on for a few days now. T-vk - I would like to second Dustin Watts' request to have this change accepted. |
ASTERIX should be ASTERISK :)
Edited BleKeyboard::begin and BleKeyboard::end to be able to delete the Task when stopping BleKeyboard. I had the need for this to so I could stop ESP32-BLE-Keyboard and start AsyncWebServer.
If you create a task like this:
TaskHandle_t xHandle = NULL;
void BleKeyboard::begin(void) { xTaskCreate(this->taskServer, "server", 20000, (void *)this, 5, &xHandle); }
You will be able to delete the task using BleKeyboard.end();
void BleKeyboard::end(void) { vTaskDelete(xHandle); }