added fixes for jpg
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user