8000 modified: cpp_utils/tests/BLETests/SampleHIDKeyboard.cpp · chegewara/esp32-snippets@9112aeb · GitHub
[go: up one dir, main page]

Skip to content

Commit 9112aeb

Browse files
committed
modified: cpp_utils/tests/BLETests/SampleHIDKeyboard.cpp
1 parent 52cb88c commit 9112aeb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp_utils/tests/BLETests/SampleHIDKeyboard.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ class MyOutputCallbacks : public BLECharacteristicCallbacks {
3636
class MyTask : public Task {
3737
void run(void*){
3838
vTaskDelay(5000/portTICK_PERIOD_MS); // wait 5 seconds before send first message
39-
const char* hello = "Hello world from esp32 hid keyboard!!!";
4039
while(1){
41-
vTaskDelay(2000/portTICK_PERIOD_MS); // simulate write message every 2 seconds
40+
const char* hello = "Hello world from esp32 hid keyboard!!!\n";
4241
while(*hello){
4342
KEYMAP map = keymap[(uint8_t)*hello];
4443
/*
@@ -55,7 +54,10 @@ class MyTask : public Task {
5554
input->setValue(v, sizeof(v));
5655
input->notify();
5756
hello++;
57+
58+
vTaskDelay(10/portTICK_PERIOD_MS);
5859
}
60+
vTaskDelay(2000/portTICK_PERIOD_MS); // simulate write message every 2 seconds
5961
}
6062
vTaskDelete(NULL);
6163
}

0 commit comments

Comments
 (0)
0