mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-28 00:38:28 +02:00
Allow ble tracker to subscribe to ota start and stop the scanning (#3800)
This commit is contained in:
@@ -21,6 +21,8 @@ static const char *const TAG = "ota";
|
||||
|
||||
static const uint8_t OTA_VERSION_1_0 = 1;
|
||||
|
||||
OTAComponent *global_ota_component = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
|
||||
std::unique_ptr<OTABackend> make_ota_backend() {
|
||||
#ifdef USE_ARDUINO
|
||||
#ifdef USE_ESP8266
|
||||
@@ -35,6 +37,8 @@ std::unique_ptr<OTABackend> make_ota_backend() {
|
||||
#endif // USE_ESP_IDF
|
||||
}
|
||||
|
||||
OTAComponent::OTAComponent() { global_ota_component = this; }
|
||||
|
||||
void OTAComponent::setup() {
|
||||
server_ = socket::socket_ip(SOCK_STREAM, 0);
|
||||
if (server_ == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user