wizard97 / arduinoprocessscheduler Goto Github PK
View Code? Open in Web Editor NEWAn Arduino object oriented process scheduler designed to replace them all
An Arduino object oriented process scheduler designed to replace them all
Tried to integrate this into my project a Makeblock mBot robot. I got all kinds of compiler errors in RingBuff like "'for loop initial declarations are only allowed in C99 mode". Seems i have to change compiler settings. The problem is that the mBot software is preconfigured and i am not sure if this change will introduce other problems.
So i decide to not use this library.
In Process.h, _period is defined as an unsigned int (line 326), and getPeriod() also returns an unsigned int (line 71). It should be a uint32_t, as that's what's taken in by setPeriod. On a lot of platforms an unsigned int is only going to be 16 bits and even going to a period of SERVICE_HOURLY results in an overflow so the process runs much more often than expected.
Hi- nice library; what would it take to support a ARM chip such as the Teensy 3.2/3.6?
I want to use the functionalitiy of the timeout handling for long running processes (Webbino). For this I have to activate the _PROCESS_EXCEPTION_HANDLING and _PROCESS_TIMEOUT_INTERRUPTS. But when I uncomment the EXCEPTION_HANDLING I receive following compiler error:
_C:\Users\Martin\Documents\Arduino\Heat2017\HT2017\libraries\Arduino_Process_Scheduler\src\ProcessScheduler\Scheduler.cpp: In member function 'virtual void Scheduler::handleException(Process*, int)':
C:\Users\Martin\Documents\Arduino\Heat2017\HT2017\libraries\Arduino_Process_Scheduler\src\ProcessScheduler\Scheduler.cpp:464:21: error: request for member 'restart' in 'process', which is of pointer type 'Process*' (maybe you meant to use '->' ?)
process.restart();_
Now my quetion is it a "layer 8 problem" or a bug?
I tried to use the 2.0 branch, as I already use RingBuffCPP in projects, but it's not working, as of now.
The method on Scheduler.h is different from the Cpp file.
const SchedulerPriorityLevel *getPLevels();
I tried fixing it blindly, but then the sketches don't run.
My ESP8266 hardware core version is 2.4.0.
I am trying to test the ArduinoProcessScheduler and it seems to me that process priorities are not working properly. The TestSchedule.ino.txt code is expected to run three identical processes with the same period of one second and three different priorities.
The output
Process: 1 at 1000.492 ms runNo=1 Priority=0
Process: 2 at 1001.564 ms runNo=1 Priority=1
Process: 3 at 1002.844 ms runNo=1 Priority=2
Process: 1 at 2000.932 ms runNo=2 Priority=0
Process: 2 at 2002.004 ms runNo=2 Priority=1
Process: 3 at 2003.284 ms runNo=2 Priority=2
Process: 2 at 3000.352 ms runNo=3 Priority=1
Process: 3 at 3001.420 ms runNo=3 Priority=2
Process: 1 at 3002.708 ms runNo=3 Priority=0
Process: 3 at 4000.800 ms runNo=4 Priority=2
Process: 1 at 4001.864 ms runNo=4 Priority=0
Process: 2 at 4003.152 ms runNo=4 Priority=1
Process: 1 at 5000.216 ms runNo=5 Priority=0
Process: 2 at 5001.348 ms runNo=5 Priority=1
Process: 3 at 5002.628 ms runNo=5 Priority=2
is rather unexpected. I believe the processes should always run in the same order.
Where is the problem?
What am I doing wrong?
Is it an interference with the Serial output delays?
Or did I miss something with the non-preemptive multitasking?
Thanks for response.
Hi,
this library is really cool and I use it for my small wake-up light project.
There is just one thing I didn't get from reading the docs: if you want to reuse a process that already finished its last iteration, you have to call .setIterations()
before restarting it. This is not a problem, but it would be good to have it mentioned in the docs.
Regards,
Richard
Currently, the scheduler is decremented the same variable that is used to store the user set number of iterations. Instead, there should be a counter that should be decremented instead.
Upon the process being added the value of the user set iterations should be used to initialize the counter value.
Hi @wizard97
we have detected a discrepancy in the library name written inside library.properties
ProcessScheduler
and the library name written inside inside the library manager index:
Arduino Process Scheduler
I think this is due to an error on our side when the library was registered in the library manager index (at the times this process was mostly manual).
Now we are about to introduce a change in the library manager that forbids the situation described above and the releases whose name differs from the name registered in the library index are ignored.
Is it ok for you to use the name ProcessScheduler
? If yes, the library will be re-published with the name ProcessScheduler
and the old Arduino Process Scheduler
will be removed from the index, in this case no action is needed on your side. In absence of an answer from you we will proceed with this proposal next week.
Thanks
See also: arduino/Arduino#7127
JOB 612 - 2018/01/15 15:43:18 Scraping https://github.com/wizard97/ArduinoProcessScheduler.git
JOB 612 - 2018/01/15 15:43:19 Checking out tag: 2.0
JOB 612 - 2018/01/15 15:43:19 Release ProcessScheduler:1.0.0 has wrong library name, should be Arduino Process Scheduler
JOB 612 - 2018/01/15 15:43:19 Checking out tag: v1.0
JOB 612 - 2018/01/15 15:43:19 Release ProcessScheduler:1.0.0 has wrong library name, should be Arduino Process Scheduler
JOB 612 - 2018/01/15 15:43:19 Checking out tag: v1.1
JOB 612 - 2018/01/15 15:43:19 Release ProcessScheduler:1.0.0 has wrong library name, should be Arduino Process Scheduler
Since the Process constructor requires the scheduler reference, how can I add a process to the scheduler inside the a custom Process class? The Arduino C/++ limitations are kind of hard on these issues.
Hello,
Is it possible for a process that has completed its intended course of actions to disable and remove itself somehow, or do I need to implement yet another killer / garbage collector process?
thanks!
I want to make a device that can play music at the same time and display lyrics on the LED,I created two Process class ,one controll play music and another controll display lyrics,how can controll delay in my Process like delay()
Are you considering a port to the ESP32 board?
or is the project dead?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.