esp-nimble-cpp
esp-nimble-cpp copied to clipboard
NimBLELocalValueAttribute::setValue() doesn't accept a char*??
Shouldn't it accept a char* as there is a SetValue(const char*) method?
/firmware/main/hw/BleImpl.cpp
In file included from /firmware/components/esp-nimble-cpp/src/NimBLECharacteristic.h:30,
from /firmware/main/hw/BleImpl.cpp:5:
/firmware/components/esp-nimble-cpp/src/NimBLELocalValueAttribute.h: In instantiation of 'void NimBLELocalValueAttribute::setValue(const T&) [with T = char*]':
/sms001/firmware/main/hw/BleImpl.cpp:119:34: required from here
119 | pLogsTx->setValue(string);
| ~~~~~~~~~~~~~~~~~^~~~~~~~
/firmware/components/esp-nimble-cpp/src/NimBLELocalValueAttribute.h:88:28: error: no matching function for call to 'NimBLEAttValue::setValue<char*>(char* const&)'
88 | m_value.setValue<T>(val);
| ~~~~~~~~~~~~~~~~~~~^~~~~
I noticed this as well today, will investigate. Workaround for now is setValue((uint8_t*)val, strlen(val));
@h2zero yep, that's what I've been using