mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
Fix ESP8266 OTA compression only starting framework v2.7.0 (#2610)
This commit is contained in:
parent
6db9d1122f
commit
77a6461c9d
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "ota_component.h"
|
#include "ota_component.h"
|
||||||
#include "ota_backend.h"
|
#include "ota_backend.h"
|
||||||
|
#include "esphome/core/macros.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace ota {
|
namespace ota {
|
||||||
|
@ -16,7 +17,11 @@ class ArduinoESP8266OTABackend : public OTABackend {
|
||||||
OTAResponseTypes write(uint8_t *data, size_t len) override;
|
OTAResponseTypes write(uint8_t *data, size_t len) override;
|
||||||
OTAResponseTypes end() override;
|
OTAResponseTypes end() override;
|
||||||
void abort() override;
|
void abort() override;
|
||||||
|
#if ARDUINO_VERSION_CODE >= VERSION_CODE(2, 7, 0)
|
||||||
bool supports_compression() override { return true; }
|
bool supports_compression() override { return true; }
|
||||||
|
#else
|
||||||
|
bool supports_compression() override { return false; }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ota
|
} // namespace ota
|
||||||
|
|
Loading…
Reference in a new issue