From 28874dfc16d049d4c929acec44a455316ba9431f Mon Sep 17 00:00:00 2001 From: dansiviter Date: Mon, 13 May 2024 17:02:57 +0100 Subject: [PATCH 1/2] Addresses #880 --- libraries/Scheduler/src/Scheduler.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/Scheduler/src/Scheduler.h b/libraries/Scheduler/src/Scheduler.h index fc8999b42..2e67454dc 100644 --- a/libraries/Scheduler/src/Scheduler.h +++ b/libraries/Scheduler/src/Scheduler.h @@ -27,12 +27,14 @@ extern "C" { typedef void (*SchedulerParametricTask)(void *); } +// This class exists for only backwards compatibility with arduino-libraries/Scheduler. +// You are encorraged to use mbed::Thread directly rather than using this. class SchedulerClass { public: SchedulerClass(); - void startLoop(SchedulerTask task, uint32_t stackSize = 1024); - void start(SchedulerTask task, uint32_t stackSize = 1024); - void start(SchedulerParametricTask task, void *data, uint32_t stackSize = 1024); + void startLoop(SchedulerTask task, uint32_t stackSize = OS_STACK_SIZE); + void start(SchedulerTask task, uint32_t stackSize = OS_STACK_SIZE); + void start(SchedulerParametricTask task, void *data, uint32_t stackSize = OS_STACK_SIZE); void yield() { ::yield(); }; private: From 7953ebf6fedc8d465883ad4f11d45f2eba26197b Mon Sep 17 00:00:00 2001 From: dansiviter Date: Mon, 13 May 2024 19:09:42 +0100 Subject: [PATCH 2/2] Fixing typo --- libraries/Scheduler/src/Scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Scheduler/src/Scheduler.h b/libraries/Scheduler/src/Scheduler.h index 2e67454dc..a43b2d4e9 100644 --- a/libraries/Scheduler/src/Scheduler.h +++ b/libraries/Scheduler/src/Scheduler.h @@ -28,7 +28,7 @@ extern "C" { } // This class exists for only backwards compatibility with arduino-libraries/Scheduler. -// You are encorraged to use mbed::Thread directly rather than using this. +// You are encouraged to use mbed::Thread directly rather than using this. class SchedulerClass { public: SchedulerClass();