mirror of
https://github.com/espressif/esp32-camera.git
synced 2025-08-23 07:05:35 +08:00

The old code always wrote BRIGHT even if enabling ISPCTRL5 failed, while also overwriting the first error code. It also used `if (ret != 0)` to log/update status, so we reported success when the write actually failed. Guard the BRIGHT write behind a successful ISPCTRL5 write and only log / update `sensor->status.brightness` when both writes succeed. This keeps the original error, and prevents false success reports.