feat: Allow OTA update to beta releases

This commit is contained in:
Joel Goguen
2026-05-07 23:29:15 -04:00
parent 0b93445450
commit 3a612df4b5
14 changed files with 398 additions and 103 deletions
+4 -1
View File
@@ -8,7 +8,7 @@
class HttpClientStream final : public Stream {
public:
explicit HttpClientStream(esp_http_client_handle_t client, int64_t contentLength);
explicit HttpClientStream(esp_http_client_handle_t client, int64_t contentLength, size_t maxBytes = 0);
int available() override;
int read() override;
@@ -19,11 +19,14 @@ class HttpClientStream final : public Stream {
size_t bytesReadCount() const { return bytesRead; }
bool hasError() const { return lastReadError < 0; }
int lastError() const { return lastReadError; }
bool isLimitExceeded() const { return limitExceeded; }
private:
esp_http_client_handle_t client;
int64_t contentLength;
size_t maxBytes;
size_t bytesRead = 0;
int lastReadError = 0;
bool endOfStream = false;
bool limitExceeded = false;
};