TcMenu / TaskManagerIO

A task, event, scheduling, and interrupt marshalling library for Arduino and mbed boards.
Apache License 2.0
124 stars 14 forks source link

Add the ability to enable and disable tasks instead of having to cancel and re-insert #30

Closed davetcc closed 3 years ago

davetcc commented 3 years ago

Add the following two new methods to taskManager:

void enableTask(taskid_t taskId, boolean taskEnabled);
boolean isTaskEnabled(taskid_t taskId);

We'll have a new status flag for enabled, I've checked and there are enough spare bits in the current execution mode status flag to deal with this.

davetcc commented 3 years ago

This is a low-risk, low overhead change that is completely backward compatible.

davetcc commented 3 years ago

This is tested on ESP8266 and now on a branch awaiting merging after more testing.