Anatoli Arkhipenko 10 жил өмнө
parent
commit
ec41c0c541
1 өөрчлөгдсөн 21 нэмэгдсэн , 0 устгасан
  1. 21 0
      README

+ 21 - 0
README

@@ -24,5 +24,26 @@ Tasks are responsible for supporting cooperative multitasking by being “good n
 “Scheduler” is executing Tasks' callback functions in the order the tasks were added to the chain, from first to last. Scheduler stops and exists after processing the chain once in order to allow other statements in the main code of loop() function to run.  This a “scheduling pass”.
  
 If compiled with _TASK_SLEEP_ON_IDLE_RUN enabled, the scheduler will place processor into IDLE sleep mode (for approximately 1 ms, as the timer interrupt will wake it up), after what is determined to be an “idle” pass. An Idle Pass is a pass through the chain when no Tasks were scheduled to run their callback functions. This is done to avoid repetitive empty passes through the chain when no tasks need to be executed. If any of the tasks in the chain always requires immediate execution (aInterval = 0), then there will be no end-of-pass delay.
+
+
+Changelog:
+    2015-02-24 - Initial release 
+    2015-02-28 - added delay() and disableOnLastIteration() functions
+    2015-03-25 - changed scheduler execute() function for a more precise delay calculation:
+                 1. Do not delay if any of the tasks ran (making request for immediate execution redundant)
+                 2. Delay is invoked only if none of the tasks ran 
+                 3. Delay is based on the min anticipated wait until next task _AND_ the runtime of execute function itself.
+    2015-05-11 - added  restart() and restartDelayed() functions to restart tasks which are on hold after running all iterations
+    2015-05-19 - completely removed  delay from the scheduler since there are no power saving there. using 1 ms sleep instead
+v1.41:
+    2015-09-15 - more careful placement of AVR-specific includes for sleep functions (compatibility with DUE)
+                         sleep on idle run is no longer a default and should be explicitly compiled with _TASK_SLEEP_ON_IDLE_RUN defined
+v1.50:
+    2015-09-20 - access to currently executing task (for callback functions)
+    2015-09-20 - pass scheduler as a parameter to the task constructor to append the task to the end of the chain
+    2015-09-20 - option to create a task already enabled
+v1.51:
+    2015-09-21 - bug fix: incorrect handling of active tasks via set() and setIterations(). 
+		 		 Thanks to Hannes Morgenstern for catching this one
  
 Note: Task Scheduler uses millis() to determine if tasks are ready to be invoked. Therefore, if you put your device to any “deep” sleep mode disabling timer interrupts, the millis() count will be suspended, leading to effective suspension of scheduling. Upon wake up, active tasks need to be re-enabled, which will effectively reset their internal time scheduling variables to the new value of millis(). Time spent in deep sleep mode should be considered “frozen”, i.e., if a task was scheduled to run in 1 second from now, and device was put to sleep for 5 minutes, upon wake up, the task will still be scheduled 1 second from the time of wake up. Executing enable() function on this tasks will make it run as soon as possible. This is a concern only for tasks which are required to run in a truly periodical manner (in absolute time terms).