update BLE ESP32 lib to last version

note this version of library is compatible with this rev:
https://github.com/espressif/arduino-esp32/tree/89859f7f4c07ce3e5d487a4b689dbda78f5d5c3a
as stated in the wiki
This commit is contained in:
Florian committed 2018-09-02 10:25:55 +02:00
1 parent 0f118c2020
commit 751c479e59
23 files changed
+461 -72

No files matched your search

@@ -683,6 +683,43 @@ void BLECharacteristic::setValue(std::string value) {
setValue((uint8_t*)(value.data()), value.length());
} // setValue
void BLECharacteristic::setValue(uint16_t& data16) {
uint8_t temp[2];
temp[0]=data16;
temp[1]=data16>>8;
setValue(temp, 2);
} // setValue
void BLECharacteristic::setValue(uint32_t& data32) {
uint8_t temp[4];
temp[0]=data32;
temp[1]=data32>>8;
temp[2]=data32>>16;
temp[3]=data32>>24;
setValue(temp, 4);
} // setValue
void BLECharacteristic::setValue(int& data32) {
uint8_t temp[4];
temp[0]=data32;
temp[1]=data32>>8;
temp[2]=data32>>16;
temp[3]=data32>>24;
setValue(temp, 4);
} // setValue
void BLECharacteristic::setValue(float& data32) {
uint8_t temp[4];
*((float *)temp) = data32;
setValue(temp, 4);
} // setValue
void BLECharacteristic::setValue(double& data64) {
uint8_t temp[8];
*((double *)temp) = data64;
setValue(temp, 8);
} // setValue
/**
* @brief Set the Write No Response property value.