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
[#1591] Move system timers to main scheduler #1594
Conversation
And fix longpulse command With other plugins active, like the OLED Framed, the set period of `longpulse_ms` may fluctuate and durations below 100 msec are quite useless. However, when running just a few sensors, the set pulse width is quite accurate. Must still check a few other plugins.
Nice screenshot of the OWON interface! I want one for my birthday :)
Den fre 20 juli 2018 02:23Gijs Noorlander <notifications@github.com> skrev:
… And fix longpulse command
With other plugins active, like the OLED Framed, the set period of
longpulse_ms may fluctuate and durations below 100 msec are quite useless.
However, when running just a few sensors, the set pulse width is quite
accurate.
[image: espeasy_pulsewidth_ms_50]
<https://user-images.githubusercontent.com/3751318/42976722-86b6a75a-8bc3-11e8-9b32-a4ceaee5287b.png>
See right column, "-PulseWidth (NW)"
[image: image]
<https://user-images.githubusercontent.com/3751318/42976757-b67b27e0-8bc3-11e8-9b46-40c95074a70f.png>
Must still check a few other plugins.
------------------------------
You can view, comment on, or merge this pull request online at:
#1594
Commit Summary
- [#1591] Move system timers to main scheduler
File Changes
- *M* src/ESPEasy-Globals.h
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-0> (13)
- *M* src/ESPEasy.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-1> (81)
- *M* src/ESPEasyTimeTypes.h
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-2> (18)
- *M* src/Scheduler.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-3> (70)
- *M* src/_P001_Switch.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-4> (12)
- *M* src/_P009_MCP.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-5> (2)
- *M* src/_P011_PME.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-6> (2)
- *M* src/_P019_PCF8574.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-7> (2)
- *M* src/__Plugin.ino
<https://github.com/letscontrolit/ESPEasy/pull/1594/files#diff-8> (10)
Patch Links:
- https://github.com/letscontrolit/ESPEasy/pull/1594.patch
- https://github.com/letscontrolit/ESPEasy/pull/1594.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1594>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZeBYg66rHnjqPGtuMye99xVapUFAujSks5uISLqgaJpZM4VXRxU>
.
|
Always nice to have some visual debugger while coding :) Would also be nice if someone could test it. |
I'm feeling a little off the loop right now. We got really hot weather, I'm on holidays, and the Swedish fires are "only" 70km away from our house. I will hopefully get more time next month 👍 |
(so I can help out more I mean) |
compiled it with this PR and flushed some uints... will report tomorrow or so.. |
These timers were not used.
…val. All enabled plugins have their own timer added to the scheduler. The `PLUGIN_INIT` function call is used to reschedule when it was added, or enabled. The set interval for the plugin will be used to set the new entry in the scheduler.
up to 04b631e it works fine... I'm adding the new commits now and retest... |
Can confirm this. Seems to run stable so far, but CPU load is too high with 10-20% and NO enabled controller and NO active task! That can not be... |
Maybe we should "tare" the percentage with nothing activated and a clean install? |
if I understood correctly this is anyway not an effective "load" which is shown, but some indication on the actual behaviour. however, just from a sunjective point of view I got the impression that especially the web-interface is a bit less responsive with this change... but again, this is not measured but just my feeling.... |
@clumsy-stefan Those charts, do they show the change between the earlier build using the new scheduler and the last additions I made? @v-a-d-e-r The general idea is a lot of things still use loops to see if there is something to be done. In short, there is still a lot of room for improvement and a lot of cycles are currently still wasted. @clumsy-stefan About responsiveness. |
@TD-er: "background tasks are also handled when calling delay()" --> That info is new for me. What about the "delayBackground" command now? Obsolete? What's the differences? |
@TD-er yes, graphs show before and after commit 447e958 @TD-er I always use the latest GIT for the ESP Core library. However I had the feeling, that memory usage got better (eg. more free memory) for GIT versus 2.4.1 core... but can't really say about responsiveness, especially since when it got more laggy.... btw: about the core version, there were changes in the tone/frequency generation handling and some issues about memory corruption etc. since a few commits there is a tone() function in the core which conflicts with the function included in the ESPCore... probably these issues when playing frequencies on some pin's that have been fixed in the core could also occur in the ESP function and is woth looking at? |
There are several background tasks. When you don't serve those on a regular base, you will loose connection, buffers will overflow, etc. So that's the core library part of the background tasks. |
And fix longpulse command
With other plugins active, like the OLED Framed, the set period of
longpulse_ms
may fluctuate and durations below 100 msec are quite useless.However, when running just a few sensors, the set pulse width is quite accurate.
See right column, "-PulseWidth (NW)"
Must still check a few other plugins.