Fixed ble
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -36,7 +36,7 @@
|
||||
url = ../../0xFEEDC0DE64/espwifistack.git
|
||||
[submodule "components/esp-nimble-cpp"]
|
||||
path = components/esp-nimble-cpp
|
||||
url = ../../0xFEEDC0DE64/esp-nimble-cpp.git
|
||||
url = ../../bobbycar-graz/esp-nimble-cpp.git
|
||||
[submodule "components/espasyncota"]
|
||||
path = components/espasyncota
|
||||
url = ../../0xFEEDC0DE64/espasyncota.git
|
||||
|
Submodule components/esp-nimble-cpp updated: c218a27dd8...29f9273c65
@ -1813,9 +1813,17 @@ CONFIG_TFT_SMOOTH_FONT=y
|
||||
#
|
||||
# ESP-NimBLE-CPP configuration
|
||||
#
|
||||
# CONFIG_NIMBLE_CPP_LOG_LEVEL_NONE is not set
|
||||
# CONFIG_NIMBLE_CPP_LOG_LEVEL_ERROR is not set
|
||||
# CONFIG_NIMBLE_CPP_LOG_LEVEL_WARNING is not set
|
||||
CONFIG_NIMBLE_CPP_LOG_LEVEL_INFO=y
|
||||
# CONFIG_NIMBLE_CPP_LOG_LEVEL_DEBUG is not set
|
||||
CONFIG_NIMBLE_CPP_LOG_LEVEL=3
|
||||
# CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT is not set
|
||||
# CONFIG_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT is not set
|
||||
# CONFIG_NIMBLE_CPP_ENABLE_ADVERTISMENT_TYPE_TEXT is not set
|
||||
# CONFIG_NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT is not set
|
||||
# CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED is not set
|
||||
CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH=20
|
||||
# end of ESP-NimBLE-CPP configuration
|
||||
# end of Component config
|
||||
|
||||
|
@ -21,19 +21,19 @@ constexpr const char * const TAG = "BOBBYBLE";
|
||||
class RemoteControlCallbacks : public NimBLECharacteristicCallbacks
|
||||
{
|
||||
public:
|
||||
void onWrite(NimBLECharacteristic* pCharacteristic) override;
|
||||
void onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo) override;
|
||||
};
|
||||
|
||||
class WirelessSettingsCallbacks : public NimBLECharacteristicCallbacks
|
||||
{
|
||||
public:
|
||||
void onWrite(NimBLECharacteristic* pCharacteristic) override;
|
||||
void onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo) override;
|
||||
};
|
||||
|
||||
class WiFiListCallbacks : public NimBLECharacteristicCallbacks
|
||||
{
|
||||
public:
|
||||
void onRead(NimBLECharacteristic* pCharacteristic) override;
|
||||
void onRead(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo) override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
@ -236,9 +236,9 @@ void handleBle()
|
||||
|
||||
namespace {
|
||||
|
||||
void RemoteControlCallbacks::onWrite(NimBLECharacteristic* pCharacteristic)
|
||||
void RemoteControlCallbacks::onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo)
|
||||
{
|
||||
const auto &val = pCharacteristic->getValue();
|
||||
const std::string& val = pCharacteristic->getValue();
|
||||
|
||||
StaticJsonDocument<256> doc;
|
||||
if (const auto error = deserializeJson(doc, val))
|
||||
@ -268,9 +268,9 @@ void RemoteControlCallbacks::onWrite(NimBLECharacteristic* pCharacteristic)
|
||||
}
|
||||
}
|
||||
|
||||
void WirelessSettingsCallbacks::onWrite(NimBLECharacteristic* pCharacteristic)
|
||||
void WirelessSettingsCallbacks::onWrite(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo)
|
||||
{
|
||||
const auto &val = pCharacteristic->getValue();
|
||||
const std::string& val = pCharacteristic->getValue();
|
||||
|
||||
StaticJsonDocument<256> doc;
|
||||
if (const auto error = deserializeJson(doc, val))
|
||||
@ -292,7 +292,7 @@ void WirelessSettingsCallbacks::onWrite(NimBLECharacteristic* pCharacteristic)
|
||||
}
|
||||
}
|
||||
|
||||
void WiFiListCallbacks::onRead(NimBLECharacteristic *pCharacteristic)
|
||||
void WiFiListCallbacks::onRead(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo)
|
||||
{
|
||||
StaticJsonDocument<768> responseDoc;
|
||||
auto wifiArray = responseDoc.createNestedArray("wifis");
|
||||
|
Reference in New Issue
Block a user