Allow ble tracker to subscribe to ota start and stop the scanning (#3800)

This commit is contained in:
Jesse Hills
2022-09-14 16:49:20 +12:00
committed by GitHub
parent a5e3cd1a42
commit f4b0917239
6 changed files with 36 additions and 12 deletions
+4
View File
@@ -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) {