T-vK / ESP32-BLE-Keyboard

Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
2.48k stars 414 forks source link

Example program won't compile with Arduino ESP32 board software v3.x #309

Closed db123 closed 4 months ago

db123 commented 5 months ago

The SendKeyStrokes example program compiles and runs correctly if I change the Arduino ESP32 board software back to version 2.0.17 in Boards Manager. It won't compile with later versions 3.x.

kotoar commented 4 months ago

It's an issue of casting from std::string (C++ STL) to String (Arduino WString) for deviceName and deviceManufacturer. After adding convert for the two strings, it compiles for me. Also noticed the fixing PR has been created but not merged yet. https://github.com/T-vK/ESP32-BLE-Keyboard/pull/303

db123 commented 4 months ago

Thanks for the reply.