-
Notifications
You must be signed in to change notification settings - Fork 251
Latest Updates
Changes:
- updated volatile compound statements after C++20 deprecated compound assignment on volatiles
- all updates from 3.7.0 to 3.8.5
Changes:
- bug: (git PR #180): the variables
tStart
andtFinish
are required if sleep support is enabled, independent of_TASK_TIMECRITICAL
. however, they were guarded by_TASK_TIMECRITICAL
as well. - bug: (git PR #181): delete manually disable tasks with self-destruct flag
- bug: (git PR #182): correct deletion of self-destruct 'current' task in
disableAll()
Changes:
- feature:
_TASK_TICKLESS
- different approach to support tickless execution under FreeRTOS (fully backwards compatible with 3.7.x). See example 28
Tickless support could be enabled under PlatformIO using arduino
and espidf
frameworks simultaneously
Changes:
- feature: added
setIntervalNodelay()
method to dynamically adjust current interval - bug: conditional compile options missing from *.hpp files (Adafruit support)
- feature: _TASK_TICKLESS - support for tickless execution under FreeRTOS
- feature: _TASK_DO_NOT_YIELD - ability to disable
yield()
inexecute()
method
Changes:
- feature: added ability for Task to "self-destruct" on disable. Useful for dynamic task management.
- Added updated example 19 for this functionality. Updated the Sketch Template. (Thanks, https://github.com/vortigont for the idea).
Changes:
- feature: added TScheduler.hpp and TSchedulerDeclarations.hpp - a workaround for conflicting declarations (e.g., nRF52840 using Adafruit Core) using namespace TS (credit: https://github.com/vortigont)
Changes:
- bug fix: Internal Status Request object completes with TASK_SR_CANCEL status if the task was canceled.
- bug fix: Internal Status Request object completes with TASK_SR_ABORT status if the task was aborted.
- feature: Status Requests with TASK_SR_ABORT status also abort dependent tasks
Changes:
- this push includes versions 3.5.0 and 3.6.0 (described below).
Changes:
- feature: added
_TASK_THREAD_SAFE
compile option for instances of TaskScheduler running under preemptive schedulers like FreeRTOS. Under certain conditions, task scheduling was adversely affected and led to unexpected results. Enabling_TASK_THREAD_SAFE
compile option eliminates such occurrences.
Changes:
- feature: added
adjust
method toTask
object.adjust(int32_t delta)
moves the entire schedule forward (positivedelta
) or backward (negativedelta
) by that many milliseconds (microseconds). This is helpful if for some reason you need to adjust the "start" time of scheduling to align with RTC "zero" seconds (for instance) or postpone one task while the other task is running. - feature: added example 27 demonstrating how to use TaskScheduler in PlatformIO projects.
Changes:
- feature: added
enable
,disable
,pause
andresume
methods toScheduler
object.enable/disable
completely stops scheduling of the tasks on this priority level and immediately returns fromexecute
method without evaluating idle sleep condition.pause/resume
stop execution of callback methods (and StatusRequest objects), but still evaluates sleep conditions and puts microcontroller to sleep if this feature is enabled. - feature: added ability to provide
external_millis
andexternal_micros
methods for alternative time calculations (in case native millis roll over too fast, or some other reason)
Changes:
- feature: added
enable
,disable
,pause
andresume
methods toScheduler
object.enable/disable
completely stops scheduling of the tasks on this priority level and immediately returns fromexecute
method without evaluating idle sleep condition.pause/resume
stop execution of callback methods (and StatusRequest objects), but still evaluates sleep conditions and puts microcontroller to sleep if this feature is enabled. - feature: added ability to provide
external_millis
andexternal_micros
methods for alternative time calculations (in case native millis roll over too fast, or some other reason)
Changes:
- feature: added
Timeout
methods forStatusRequest
objects.
Changes:
- feature: added
Timeout
methods forStatusRequest
objects.
Changes:
- feature: added method
cancel()
to Task class - execution of the task stops with setting a "canceled" flag.
NOTE: onDisable()
is called after canceled flag is set.
- feature: added method
canceled()
- check if task was canceled during onDisable() or other subsequent processing. - feature: added method
abort()
to Task class - execution of the task stops with setting a "canceled" flag.
NOTE: onDisable()
is NOT called by the abort()
method.
Changes:
- feature: added method
cancel()
to Task class - execution of the task stops with setting a "canceled" flag. NOTE:onDisable()
is called after canceled flag is set. - feature: added method
canceled()
- check if task was canceled during onDisable() or other subsequent processing.
Changes:
- feature: added method
abort()
to Task class - execution of the task stops without callingOnDisable()
method.
Changes:
- update: starting from September 16, 2020, a separate commercial version of TaskScheduler is available from xs:code
Changes:
- feature: scheduling options with priority for original schedule, original schedule without "catch-up", and interval (see Issue #103) for explanations.
- update: non-Avr power-saving features are now available with the premium license only via xs:code
Changes:
- feature: scheduling options with priority for original schedule, original schedule without "catch-up", and interval (see Issue #103) for explanations.
Changes:
- warning fix: unused parameter 'aRecursive' (Issue #99)
Changes:
- bug fix:
deleteTask()
andaddTask()
should check task ownership first (Issue #97). - feature: light sleep for ESP32 chip.
Changes:
- bug fix:
deleteTask()
andaddTask()
should check task ownership first (Issue #97).
Changes:
- feature: light sleep for ESP32 chip.
Changes:
- bug fix: fixed compiler warnings about unused variables under certain compile options.
- feature:
_TASK_EXPOSE_CHAIN
compile option giving access to task execution chain:Task* Scheduler::getFirstTask()
,Task* Scheduler::getLastTask()
,Task* Task::getPreviousTask()
, andTask* Task::getNextTask()
Changes:
- bug fix: corrected external forward definitions for millis() and micros().
Version 3.1.1 is a collection of updates from testing branch from version 3.0.0
Changes:
- update: more precise CPU load measuring. Ability to define idle sleep threshold for ESP chips. Please see example #24.
Changes:
- feature: added 4 CPU load monitoring methods for _TASK_TIMECRITICAL compilation option; Please see example #24. Issue #81
Changes:
- feature: Custom idle sleep function support via TaskScheduler setSleepMethod method; Please see example #23. Also Idle Sleep support for MSP430 and MSP432 boards. PR #75
Changes:
- bug fixed: Example #19 uses appropriate freeMemory() method and properly deletes the tasks on STM32F1 boards (Tested on Mini USB STM32F103RCBT6 ARM Cortex-M3 leaflabs Leaf maple mini module).
Due to the multi-core nature of ESP32, it is not recommended to use TaskScheduler on that chip. Pre-emptive multitasking between the cores breaks the cooperative paradigm of TaskScheduler leading to crashes and core dumps. I would recommend using FreeRTOS instead as it is supported by ESP32 natively. For more details see comment for Issue #41
New features:
- Dynamic Callback binding via compilation parameter
_TASK_OO_CALLBACKS
. See example #21 for details of how to program Tasks in a true Object Oriented way - Sketch template. Located here this sketch is available as a TaskScheduler example in the IDE to jump-start your Task-enabled project
- Support for STM32 devices
- Various bug fixes and tuning
Changes:
- bug fixed: default constructor if ambiguous when compiled for Status Requests Issue #65
- support for STM32F1 boards (IDLE sleep and examples). Tested on Mini USB STM32F103RCBT6 ARM Cortex-M3 leaflabs Leaf maple mini module F
Changes:
- bug fixed: task deleted from the execution chain cannot be added back Issue #67
- created a template sketch: a minimal TS-enabled code with all the compile parameters explained in the code.
Version 3.0.0 is a major release which add significant new functionality to the TaskScheduler library. The main added feature is:
- Support for dynamic callback methods binding via compilation parameter
_TASK_OO_CALLBACKS
Version 2.6.1 has been regression tested and pushed into the master branch. It should be picked up by Arduino IDE and available for an upgrade now. The main features are:
- 2 small corner case bug fixes
- Added example 19: dynamic task creation and destruction.
- Added example 20: use of local task storage to work with task-specific class objects
Enjoy.
This iteration contains Example #20 which illustrated the use of task-specific class objects via local task storage functionality (LTS). Also, a corner-case bug was discovered and fixed: if low priority scheduler has an empty chain, high priority scheduler is executed. Fixed now. Example 20 is basically example 19 with random number of sensors using task-specific class object.
Version 2.6.1 fixes a bug that prevented tasks from correctly self-destructing inside the OnDisable method. Example 19 is provided illustrating the use of dynamically created and deleted Tasks.
Version 2.6.0 has been regression tested and pushed into the master branch. It should be picked up by Arduino IDE and available for an upgrade now. The main features are:
- Support for ESP32
- Overall task timeout functionality
- Support for "bare metal" compilation
Enjoy.
New example that illustrated the use of several compilation directives has been posted. Example 18 is a rewrite of example 5 using TIMEOUT, LTS, WTD, and other directives. Please check out here.
Multiple updates pushed for testing into "testing" branch:
- Support for ESP32 (Pull Request #47)
- Forward definitions of
millis()
andmicros()
for bare metal compilation (Pull Request #43) - Support for overall Task Timeouts. (please see example: here)
If you consider writing or changing a library to be TaskScheduler friendly, please consider reading this first.
Testing branch updated with 2.5.2 version introducing "bare metal" functionality: _TASK_BARE_METAL compilation directive added, which requires forward definition of arduino-specific methods, i.e.:
millis()
micros()
delay()
Testing branch updated with 2.5.1 version introducing _TASK_INLINE compilation directive. _TASK_INLINE compilation directive marks all methods of Task, Scheduler and StatusRequest object as inline. This was requested by a few people who use multi-tab and non-Arduino IDEs, or use TaskScheduler declarations inside other C++ classes.