Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webcam mutex - fixes some AIThinker webcam issues #18652

Closed
wants to merge 5 commits into from

Conversation

btsimonh
Copy link
Contributor

@btsimonh btsimonh commented May 14, 2023

Description:

Related issue (if applicable): fixes Discussion 18482

Investigation of webcam failures in AITHINKER esp32cam module indicate that the issue is likely multi-threading.
The modifications in this PR add a mutex to many webcam related functions in the webcam driver.
See discussion for the types of issues experienced.

NOTE: I have also enabled USE_I2C in webcam firmware - this is not necessary, but helps with understanding webcam hardware.

Checklist:

  • [*] The pull request is done against the latest development branch
  • [*] Only relevant files were touched
  • [*] Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • [*] The code change is tested and works with Tasmota core ESP32 V.2.0.9
  • [*] I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

btsimonh and others added 5 commits May 14, 2023 11:52
This is useful to be able to (manually) run cmd I2CSCAN2.
…ltiple threads.

Bugfix in Wc.up detect in WcInterruptControl?
Just added a deviation of your code so this is no lonfger needed.
Again, eneabled this in latest update to dev. No longer needed.
@arendst
Copy link
Owner

arendst commented May 14, 2023

I've just made changes a bit different to what you suggested to the I2C init code. ALso enable I2C for the webcam.

@btsimonh
Copy link
Contributor Author

@arendst -

hmm.. I don't see any mutex in new commits.... @Jason2866 fixed the Wc.up thing... and I see your I2C...

do you want me to re-create the PR on top of the latest dev?

br,
Simon

@arendst
Copy link
Owner

arendst commented May 14, 2023

Yes pls

@btsimonh btsimonh closed this May 14, 2023
@btsimonh
Copy link
Contributor Author

Replaced with a new one on top of modified dev

@btsimonh btsimonh deleted the webcamMutex branch May 27, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants