GithubHelp home page GithubHelp logo

Comments (7)

alexanderturner avatar alexanderturner commented on September 20, 2024

Digging a bit deeper into this to force the IDF functions event-drivenness with a new arg in wifi_manager_event_handler and passing false to the blocking attribute. It appears to be an issue with esp-idf blocking the thread when running the scan. Perhaps there should be a timer arg for the wifi scan instead of it being called every time jquery call it.

from esp32-wifi-manager.

tonyp7 avatar tonyp7 commented on September 20, 2024

Helo Alex,

You can indeed set it to false but this brings a whole lot of new issues with thread synchronization. However, it is true blocking the thread is not ideal.

The whole architecture of the manager is hindered by the events being only triggered by a bitfield.

I am currently re-writing the app so that it uses a RTOS queue as primary thread sync instead. This a major rewrite so bear with me; I do not wish to commit broken code to the repository for now!

from esp32-wifi-manager.

tonyp7 avatar tonyp7 commented on September 20, 2024

This is fixed in branch 2.0

from esp32-wifi-manager.

tonyp7 avatar tonyp7 commented on September 20, 2024

Fixed in latest master trunk -- scans are now non blocking

from esp32-wifi-manager.

alexanderturner avatar alexanderturner commented on September 20, 2024

Thanks for this Tony! I should have jumped in with a PR sooner but awesome to see this being actively maintained. I had set the blocking field to false and actioned the update task on in the event handler but whilst it's now 'non blocking' it's still blocking the thread for similar time when it's executing the scan (which is pretty frequently when the jquery script is running).

I'm working on project which could benefit from RTOS queues - are you keeping that effort in a working branch?

from esp32-wifi-manager.

tonyp7 avatar tonyp7 commented on September 20, 2024

I merged my dev branch into the master so you can simply get the master :)

Queue process starts here:

xStatus = xQueueReceive( wifi_manager_queue, &msg, portMAX_DELAY );

from esp32-wifi-manager.

alexanderturner avatar alexanderturner commented on September 20, 2024

Ah awesome :) Thanks. Would be awesome to have a build status for master :)

from esp32-wifi-manager.

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.