added fixes for jpg

This commit is contained in:
2026-08-20 21:49:05 +02:00
parent 81717cb9a8
commit 2b5004a569
4 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ void FastJpeg::dump_config() {
}
void FastJpeg::update() {
if (this->is_failed() || this->task_ == nullptr)
if (this->is_failed() || this->task_ == nullptr || !this->enabled_.load())
return;
if (this->busy_.load() || this->decoded_ready_.load())
return;
+3
View File
@@ -23,6 +23,8 @@ class FastJpeg : public PollingComponent {
void set_x(int x) { this->x_ = x; }
void set_y(int y) { this->y_ = y; }
void set_big_endian(bool big_endian) { this->big_endian_ = big_endian; }
void set_enabled(bool enabled) { this->enabled_.store(enabled); }
bool is_stream_enabled() const { return this->enabled_.load(); }
void setup() override;
void loop() override;
@@ -71,6 +73,7 @@ class FastJpeg : public PollingComponent {
size_t http_rx_len_{0};
std::atomic<bool> busy_{false};
std::atomic<bool> decoded_ready_{false};
std::atomic<bool> enabled_{true};
bool bars_cleared_{false};
char etag_[80]{};
uint32_t frames_{0};