From feefff59a677710054b461831afed23db4efd746 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sat, 27 Feb 2021 13:08:03 -0500 Subject: [PATCH 01/17] src:arduino-timer:ticks use ULONG_MAX Use ULONG_MAX from climits instead of casting -1. --- src/arduino-timer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/arduino-timer.h b/src/arduino-timer.h index 99021b5..c87b06b 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -41,6 +41,8 @@ #include #endif +#include + #ifndef TIMER_MAX_TASKS #define TIMER_MAX_TASKS 0x10 #endif @@ -142,7 +144,7 @@ class Timer { unsigned long ticks() const { - unsigned long ticks = (unsigned long)-1, elapsed; + unsigned long ticks = ULONG_MAX, elapsed; const unsigned long start = time_func(); timer_foreach_const_task(task) { @@ -162,7 +164,7 @@ class Timer { elapsed = time_func() - start; - if (elapsed >= ticks || ticks == (unsigned long)-1) ticks = 0; + if (elapsed >= ticks || ticks == ULONG_MAX) ticks = 0; else ticks -= elapsed; return ticks; From a90f1ff3674001f4c1c427bf718f546281fd0261 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sun, 19 Dec 2021 13:04:06 -0500 Subject: [PATCH 02/17] arduino-timer: 2.3.1 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 8133441..899b37a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=arduino-timer -version=2.3.0 +version=2.3.1 author=Michael Contreras maintainer=Michael Contreras From 7e0d2a363bec3ab9a7f02d0a6034f7d6f4f681aa Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Tue, 10 Nov 2020 09:30:21 -0700 Subject: [PATCH 03/17] src:arduino-timer: Remove WProgram.h include This header was renamed in Nov. 2011 and only Arduino IDE versions prior to v1.0 used that name. Signed-off-by: Sean Robinson --- src/arduino-timer.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/arduino-timer.h b/src/arduino-timer.h index c87b06b..badff68 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -35,11 +35,7 @@ #ifndef _CM_ARDUINO_TIMER_H__ #define _CM_ARDUINO_TIMER_H__ -#if defined(ARDUINO) && ARDUINO >= 100 #include -#else -#include -#endif #include From b8add673c31341e36b6c0a7d4fddc44c828eda54 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sun, 19 Dec 2021 13:17:07 -0500 Subject: [PATCH 04/17] src:timer: deprecate timer.h file with error --- src/timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timer.h b/src/timer.h index dbe114c..6e5a669 100644 --- a/src/timer.h +++ b/src/timer.h @@ -1,3 +1,3 @@ -#warning "Including this file is deprecated. Please #include instead." +#error "Including this file is deprecated. Please #include instead." #include From 2b895bba4ac4ded74456a51cff2242117de5e745 Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Thu, 27 Oct 2022 08:44:30 -0700 Subject: [PATCH 05/17] ci: update to avoid deprecated warnings on builds --- .github/workflows/aunit_tests.yml | 4 ++-- .github/workflows/githubci.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aunit_tests.yml b/.github/workflows/aunit_tests.yml index 9b613ee..78014b5 100644 --- a/.github/workflows/aunit_tests.yml +++ b/.github/workflows/aunit_tests.yml @@ -5,10 +5,10 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build run: | diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index 913acae..acf6b5a 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -10,8 +10,8 @@ jobs: - uses: actions/setup-python@v1 with: python-version: '3.x' - - uses: actions/checkout@v2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: repository: adafruit/ci-arduino path: ci From 4be70b785f4fca04dbb067d97bdda789990c9222 Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Thu, 27 Oct 2022 09:00:57 -0700 Subject: [PATCH 06/17] ci: setup-python action at v4 now. --- .github/workflows/githubci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index acf6b5a..fe69886 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: '3.x' - uses: actions/checkout@v3 From a15572c3fa70f9e74901882bdfafc1bd25215bc0 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sun, 5 Feb 2023 16:03:20 -0500 Subject: [PATCH 07/17] src:arduino-timer: revert to simple task id Go back to the original simple task id based on pointer values without a counter. Fixes: - broken check in cancel: should be t ^ task == t->id - task = 0 breaks contract for task_id and all timer add functions No more protection against stale task ids in cancel. --- src/arduino-timer.h | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/src/arduino-timer.h b/src/arduino-timer.h index c87b06b..91e1e8e 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -64,14 +64,14 @@ template < class Timer { public: - typedef uintptr_t Task; /* public task handle */ + typedef void * Task; /* public task handle */ typedef bool (*handler_t)(T opaque); /* task handler func signature */ /* Calls handler with opaque as argument in delay units of time */ Task in(unsigned long delay, handler_t h, T opaque = T()) { - return task_id(add_task(time_func(), delay, h, opaque)); + return add_task(time_func(), delay, h, opaque); } /* Calls handler with opaque as argument at time */ @@ -79,28 +79,22 @@ class Timer { at(unsigned long time, handler_t h, T opaque = T()) { const unsigned long now = time_func(); - return task_id(add_task(now, time - now, h, opaque)); + return add_task(now, time - now, h, opaque); } /* Calls handler with opaque as argument every interval units of time */ Task every(unsigned long interval, handler_t h, T opaque = T()) { - return task_id(add_task(time_func(), interval, h, opaque, interval)); + return add_task(time_func(), interval, h, opaque, interval); } /* Cancel the timer task */ void cancel(Task &task) { - if (!task) return; - - timer_foreach_task(t) { - if (t->handler && task_id(t) == task) { - remove(t); - break; - } - } + struct task * const t = static_cast(task); + if (t) remove(t); task = static_cast(NULL); } @@ -194,19 +188,16 @@ class Timer { return true; } - Timer() : ctr(0), tasks{} {} + Timer() : tasks{} {} private: - size_t ctr; - struct task { handler_t handler; /* task handler callback func */ T opaque; /* argument given to the callback handler */ unsigned long start, - expires; /* when the task expires */ - size_t repeat, /* repeat task */ - id; + expires, /* when the task expires */ + repeat; /* repeat task */ } tasks[max_tasks]; inline @@ -218,16 +209,6 @@ class Timer { task->start = 0; task->expires = 0; task->repeat = 0; - task->id = 0; - } - - inline - Task - task_id(const struct task * const t) - { - const Task id = reinterpret_cast(t); - - return id ? id ^ t->id : id; } inline @@ -250,9 +231,6 @@ class Timer { if (!slot) return NULL; - if (++ctr == 0) ++ctr; // overflow - - slot->id = ctr; slot->handler = h; slot->opaque = opaque; slot->start = start; From 20227d6832214c32563c7917d16ce95a3f8ffe9f Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Mon, 6 Feb 2023 22:25:03 -0500 Subject: [PATCH 08/17] src:arduino-timer: cancel return bool cancel will return true if a task is canceled and false otherwise. --- src/arduino-timer.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/arduino-timer.h b/src/arduino-timer.h index 91e1e8e..37490bb 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -90,13 +90,18 @@ class Timer { } /* Cancel the timer task */ - void + bool cancel(Task &task) { struct task * const t = static_cast(task); - if (t) remove(t); - task = static_cast(NULL); + if (t) { + remove(t); + task = static_cast(NULL); + return true; + } + + return false; } /* Cancel all timer tasks */ From a2cae666c05e848fde3f0a91b77e1edaed5b37a5 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Mon, 6 Feb 2023 22:25:42 -0500 Subject: [PATCH 09/17] readme: cancel return bool --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fbd2d7b..d22fdd1 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Timer<>::Task every(unsigned long interval, handler_t handler, T opaque = T()); /* Cancel a timer task */ -void cancel(Timer<>::Task &task); +bool cancel(Timer<>::Task &task); /* Cancel all tasks */ void cancel(); From 65d177509caacf50f8893476ba5bb30c6f26d329 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Mon, 6 Feb 2023 22:26:04 -0500 Subject: [PATCH 10/17] extras:tests:unitTest: cancel returns expected --- extras/tests/unitTest/unitTest.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extras/tests/unitTest/unitTest.ino b/extras/tests/unitTest/unitTest.ino index 0c7a20c..322d5b8 100644 --- a/extras/tests/unitTest/unitTest.ino +++ b/extras/tests/unitTest/unitTest.ino @@ -262,7 +262,10 @@ test(timer_cancel) { // assert task has not run assertEqual(task.runs, 0UL); - timer.cancel(r); + const bool success = timer.cancel(r); + + // assert task found + assertEqual(success, true); // assert task cleared assertEqual((unsigned long)r, 0UL); @@ -275,6 +278,11 @@ test(timer_cancel) { // assert task did not run assertEqual(timer.tick(), 0UL); assertEqual(task.runs, 0UL); + + const bool fail = timer.cancel(r); + + // assert task not found + assertEqual(fail, false); } test(timer_cancel_all) { From 9fa42aa9995fb3fc4a058fe746332fee84cc4864 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Mon, 6 Feb 2023 22:31:23 -0500 Subject: [PATCH 11/17] arduino-timer: 3.0.0 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 899b37a..f775fde 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=arduino-timer -version=2.3.1 +version=3.0.0 author=Michael Contreras maintainer=Michael Contreras From 1baebd438b19851f612d0cb3d2b20929803078f1 Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Sun, 12 Feb 2023 12:20:40 -0800 Subject: [PATCH 12/17] Add task create/cancel regression test see if redundant task IDs allocated see if NULL task ID created see if a double cancel() kills another task makefile rule for timerMultiCancelTest EpoxyDuino doesn't support serial print HEX. --- extras/tests/timerMultiCancelTest/Makefile | 9 + .../timerMultiCancelTest.ino | 173 ++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 extras/tests/timerMultiCancelTest/Makefile create mode 100644 extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino diff --git a/extras/tests/timerMultiCancelTest/Makefile b/extras/tests/timerMultiCancelTest/Makefile new file mode 100644 index 0000000..95242c9 --- /dev/null +++ b/extras/tests/timerMultiCancelTest/Makefile @@ -0,0 +1,9 @@ +# See https://github.com/bxparks/UnixHostDuino for documentation about this +# Makefile to compile and run Arduino programs natively on Linux or MacOS. +# + +APP_NAME := timerMultiCancelTest +ARDUINO_LIBS := AUnit arduino-timer +CPPFLAGS += -Werror + +include $(UNIXHOSTDUINO) diff --git a/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino new file mode 100644 index 0000000..827e224 --- /dev/null +++ b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino @@ -0,0 +1,173 @@ +// arduino-timer unit tests +// timerMultiCancelTest.ino unit test +// find regressions when: +// timer.cancel(...) is called twice and cancels an extra task +// timer.in/at/every(...) return task id 0 (should mean "not created") +// timer.in/at/every(...) return an in-use task id (1 id with 2 tasks) + +// Arduino "AUnit" library required + +// Required for UnixHostDuino emulation +#include + +#if defined(UNIX_HOST_DUINO) +#ifndef ARDUINO +#define ARDUINO 100 +#endif +#endif + +#include +#include + +//#define DEBUG +#ifdef DEBUG +#define DEBUG_PRINT(x) Serial.print(x) +#define DEBUG_PRINTLN(x) Serial.println(x) +#else +#define DEBUG_PRINT(x) +#define DEBUG_PRINTLN(x) +#endif + +auto timer = timer_create_default(); // create a timer with default settings + +// a generic task +bool dummyTask(void*) { + //digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // toggle the LED + return true; // repeat? true +} + +struct TaskInfo { + Timer<>::Task id; // id to use to cancel + unsigned long instanceNumber; +}; + +static const int numTaskIds = 20; + +TaskInfo tasksToCancel[numTaskIds] = { 0 }; + +unsigned long creationAttempts = 0; + +bool createTask(int index) { + bool successful = true; // OK so far + TaskInfo& taskInfo = tasksToCancel[index]; + + if (taskInfo.id != (Timer<>::Task)NULL) { + // cancel task in slot + auto staleId = taskInfo.id; + int beforeSize = (int)timer.size(); + timer.cancel(taskInfo.id); + int afterSize = (int)timer.size(); + successful &= (afterSize == beforeSize - 1); + if (!successful) { + Serial.println(F("could not cancel a task")); + } else { + + timer.cancel(staleId); // double cancel should not hit another task + int afterSize2 = (int)timer.size(); + successful &= (afterSize2 == beforeSize - 1); + if (!successful) { + Serial.println(F("second cancel removed another task")); + } + } + } + + auto newId = timer.every(250, dummyTask); + ++creationAttempts; + + static size_t timerSize = 0; + auto newSize = timer.size(); + if (timerSize != newSize) { + timerSize = newSize; + DEBUG_PRINT(F("Timer now has ")); + DEBUG_PRINT(timerSize); + DEBUG_PRINTLN(F(" tasks")); + } + + if (newId == 0) { + Serial.print(F("timer task creation failure on creation number ")); + Serial.println(creationAttempts); + successful = false; + + } else { + + // check for collisions before saving taskInfo + for (int i = 0; i < numTaskIds; i++) { + const TaskInfo& ti = tasksToCancel[i]; + if (ti.id == newId) { + successful = false; + Serial.print(F("COLLISION FOUND! instance number: ")); + Serial.print(creationAttempts); + Serial.print(F(" hash ")); + Serial.print(F("0x")); + Serial.print((size_t)newId, HEX); + Serial.print(F(" ")); + Serial.print((size_t)newId, BIN); + + Serial.print(F(" matches hash for instance number: ")); + Serial.println(ti.instanceNumber); + } + } + taskInfo.id = newId; + taskInfo.instanceNumber = creationAttempts; + + static const unsigned long reportCountTime = 10000; + if (creationAttempts % reportCountTime == 0) { + DEBUG_PRINT(creationAttempts / 1000); + DEBUG_PRINTLN(F("k tasks created.")); + } + } + return successful; +} + +test(timerMultiCancel) { + timer.cancel(); // ensure timer starts empty + assertEqual((int)timer.size(), 0); + creationAttempts = 0; + + // timer capacity is 0x10 -- stay below + // load up some static tasks + for (int i = 0; i < 6; i++) { + assertTrue(createTask(i)); + } + + assertEqual((int)timer.size(), 6); + + // cancel/recreate tasks + //for (unsigned long groups = 0; groups < 30000UL; groups++) { + unsigned long groups = 0; + do { + //for (unsigned long groups = 0; creationAttempts < 0x10010; groups++) { // trouble over 64k tasks? + for (int i = 9; i < 0x10; i++) { + assertTrue(createTask(i)); + if (groups > 0) { + // should be steady-state task size now + assertEqual((int)timer.size(), 13); + } + } + groups++; + //} + } while (creationAttempts < 0x10010); // no trouble over 64K tasks? + + Serial.print(creationAttempts); + Serial.println(F(" tasks created.")); +} + +void sketch(void) { + Serial.println(); + Serial.println(F("Running " __FILE__ ", Built " __DATE__)); +} + +void setup() { + ::delay(1000UL); // wait for stability on some boards to prevent garbage Serial + Serial.begin(115200UL); // ESP8266 default of 74880 not supported on Linux + while (!Serial) + ; // for the Arduino Leonardo/Micro only + sketch(); +} + +void loop() { + // Should get: + // TestRunner summary: + // passed, failed, skipped, timed out, out of test(s). + aunit::TestRunner::run(); +} From 6d5bd48fd468c435c28f69ef5c77f2d83b08ab30 Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Sun, 12 Feb 2023 13:38:14 -0800 Subject: [PATCH 13/17] arduino platform build default has esp32 esp8266 --- .github/workflows/githubci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index fe69886..90fd695 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -20,8 +20,8 @@ jobs: run: bash ci/actions_install.sh - name: test platforms - #run: python3 ci/build_platform.py main_platforms - run: python3 ci/build_platform.py main_platforms esp32 esp8266 + run: python3 ci/build_platform.py main_platforms + #run: python3 ci/build_platform.py main_platforms esp32 esp8266 #run: python3 ci/build_platform.py main_platforms esp32 esp8266 nrf52840 # disabled for now. From 277396cc276a2b7a8c11715ef48773e3072021cd Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Sun, 12 Feb 2023 14:34:33 -0800 Subject: [PATCH 14/17] confirm timer.cancel() returns success if task cancelled cancel() returns success only if it removed a task check cancel with stale pointer fails cancelling a removed task should fail add range check for cancel() arg --- .../timerMultiCancelTest/timerMultiCancelTest.ino | 4 ++-- extras/tests/unitTest/unitTest.ino | 13 +++++++++---- src/arduino-timer.h | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino index 827e224..ef4e136 100644 --- a/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino +++ b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino @@ -55,14 +55,14 @@ bool createTask(int index) { // cancel task in slot auto staleId = taskInfo.id; int beforeSize = (int)timer.size(); - timer.cancel(taskInfo.id); + successful &= timer.cancel(taskInfo.id); int afterSize = (int)timer.size(); successful &= (afterSize == beforeSize - 1); if (!successful) { Serial.println(F("could not cancel a task")); } else { - timer.cancel(staleId); // double cancel should not hit another task + successful &= !timer.cancel(staleId); // double cancel should not hit another task int afterSize2 = (int)timer.size(); successful &= (afterSize2 == beforeSize - 1); if (!successful) { diff --git a/extras/tests/unitTest/unitTest.ino b/extras/tests/unitTest/unitTest.ino index 322d5b8..dfb962d 100644 --- a/extras/tests/unitTest/unitTest.ino +++ b/extras/tests/unitTest/unitTest.ino @@ -262,6 +262,7 @@ test(timer_cancel) { // assert task has not run assertEqual(task.runs, 0UL); + auto stale_r = r; const bool success = timer.cancel(r); // assert task found @@ -283,6 +284,10 @@ test(timer_cancel) { // assert task not found assertEqual(fail, false); + + // stale task pointer has nothing to cancel + const bool stale_cancel_fail = timer.cancel(stale_r); + assertEqual(stale_cancel_fail, false); } test(timer_cancel_all) { @@ -373,23 +378,23 @@ test(timer_size) { Timer<0x2, CLOCK::millis, Task *> timer; - assertEqual(timer.size(), 0UL); + assertEqual((unsigned long) timer.size(), 0UL); auto t = make_task(); auto r = timer.in(0UL, handler, &t); assertNotEqual((unsigned long)r, 0UL); - assertEqual(timer.size(), 1UL); + assertEqual((unsigned long) timer.size(), 1UL); r = timer.in(0UL, handler, &t); assertNotEqual((unsigned long)r, 0UL); - assertEqual(timer.size(), 2UL); + assertEqual((unsigned long) timer.size(), 2UL); timer.cancel(); - assertEqual(timer.size(), 0UL); + assertEqual((unsigned long) timer.size(), 0UL); } test(timer_empty) { diff --git a/src/arduino-timer.h b/src/arduino-timer.h index a4a8ee6..a1acc27 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -91,7 +91,7 @@ class Timer { { struct task * const t = static_cast(task); - if (t) { + if (t && (tasks <= t) && (t < tasks + max_tasks) && (t->handler)) { remove(t); task = static_cast(NULL); return true; From a4c075b961fb100565a1db107bb3f4d1902f16ca Mon Sep 17 00:00:00 2001 From: Phil Jansen Date: Tue, 7 Mar 2023 12:49:08 -0800 Subject: [PATCH 15/17] remove unneeded parentheses --- src/arduino-timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arduino-timer.h b/src/arduino-timer.h index a1acc27..f9e6a76 100644 --- a/src/arduino-timer.h +++ b/src/arduino-timer.h @@ -91,7 +91,7 @@ class Timer { { struct task * const t = static_cast(task); - if (t && (tasks <= t) && (t < tasks + max_tasks) && (t->handler)) { + if (t && (tasks <= t) && (t < tasks + max_tasks) && t->handler) { remove(t); task = static_cast(NULL); return true; From f2ad62d5704638e943a2230f572372a1a826658c Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sat, 17 Jun 2023 21:14:44 -0700 Subject: [PATCH 16/17] extras:tests:timerMultiCancelTest: fix initializer --- extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino index ef4e136..965e1e4 100644 --- a/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino +++ b/extras/tests/timerMultiCancelTest/timerMultiCancelTest.ino @@ -43,7 +43,7 @@ struct TaskInfo { static const int numTaskIds = 20; -TaskInfo tasksToCancel[numTaskIds] = { 0 }; +TaskInfo tasksToCancel[numTaskIds] = { { 0, 0 } }; unsigned long creationAttempts = 0; From 2adf6b16ac2a2ab1571acd8c4b3d0699311e60e1 Mon Sep 17 00:00:00 2001 From: Michael Contreras Date: Sat, 5 Aug 2023 22:02:16 -0700 Subject: [PATCH 17/17] arduino-timer: 3.0.1 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index f775fde..ccb2f79 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=arduino-timer -version=3.0.0 +version=3.0.1 author=Michael Contreras maintainer=Michael Contreras