Git Product home page Git Product logo

Comments (6)

thomas-pegot avatar thomas-pegot commented on May 30, 2024 1

Hi @raphaelbs ,
I tried it and I had the same outcome.
So it happens when it calls gpio_install_isr_service it changed on 29dec 2019.
We can try/catch this error 409 to bypass it. But since it's a "goto fail" idk if we can do much.
I believe we can't catch it since it's a "goto fail" after and jump all the next code.

from esp32-cam-ai-thinker.

thomas-pegot avatar thomas-pegot commented on May 30, 2024
/**
 * @brief Initialize the camera driver
 *
 * @note call camera_probe before calling this function
 *
 * This function detects and configures camera over I2C interface,
 * allocates framebuffer and DMA buffers,
 * initializes parallel I2S input, and sets up DMA descriptors.
 *
 * Currently this function can only be called once and there is
 * no way to de-initialize this module.
 *
 * @param config  Camera configuration parameters
 *
 * @return ESP_OK on success
 */
esp_err_t esp_camera_init(const camera_config_t* config);

So it seems logic that this trick shouldn't work;

esp_camera_deinit();
ESP_ERROR_CHECK(esp_camera_init(&photo_config));

from esp32-cam-ai-thinker.

raphaelbs avatar raphaelbs commented on May 30, 2024

Hey @thomas-pegot, thanks for reporting this issue!

Looking at the deinit function, it does remove the GPIO handler but this doesn't seems to be enough.
Can you try calling gpio_uninstall_isr_service after the esp_camera_deinit?

from esp32-cam-ai-thinker.

raphaelbs avatar raphaelbs commented on May 30, 2024

Oh I see. That explains why it was working before!

Using the uninstall method should've worked as it sets the gpio_isr_func to NULL and the install method only asserts the value of gpio_isr_func.

I guess we should investigate other methods of re-config the camera.

from esp32-cam-ai-thinker.

raphaelbs avatar raphaelbs commented on May 30, 2024

The camera driver hosted on this repo is the outdated version:
https://github.com/raphaelbs/esp32-cam-ai-thinker/blob/master/components/ov2640/camera/camera.c#L1165

The build should work with it.

from esp32-cam-ai-thinker.

thomas-pegot avatar thomas-pegot commented on May 30, 2024

I mean what are the pros to reset camera ?
This code can work fine without:
esp_camera_deinit(); ESP_ERROR_CHECK(esp_camera_init(&photo_config));

and add esp_camera_fb_return(fb) at the end of the loop.

Could for example make a different branch to denote version with old esp_camera lib and one with new esp_camera that stay updated.
Just some thought and thank you for your reply.

from esp32-cam-ai-thinker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.