sqfmi / Watchy

Watchy - An Open Source E-Ink Smartwatch
http://www.sqfmi.com
MIT License
1.83k stars 319 forks source link

Improve portability between different versions of Arduino-ESP32. #254

Closed OlegGirko closed 4 days ago

OlegGirko commented 4 days ago

The BLECharacteristic::getValue() method returns std::string in older versions of Arduino core for the ESP32 and String in newer versions.

However, the return value is used in a way that both classes support: using only length() and c_str() methods.

Hence, replacing explicit type name with auto keyword makes the code compatible with older and newer versions.

sqfmi commented 4 days ago

awesome, thank you!