From 1be0b6919c1e686519e16a1b216c7c7c3dd7cc2f Mon Sep 17 00:00:00 2001 From: rob tillaart Date: Thu, 23 Dec 2021 18:59:45 +0100 Subject: [PATCH] 0.1.6 PinOutGroup --- libraries/PinOutGroup/LICENSE | 2 +- libraries/PinOutGroup/PinOutGroup.cpp | 9 +++++---- libraries/PinOutGroup/PinOutGroup.h | 8 +++++--- libraries/PinOutGroup/examples/led13/led13.ino | 2 +- .../PinOutGroup/examples/sevenSegment/sevenSegment.ino | 2 -- .../examples/testPinOutGroup/testPinOutGroup.ino | 3 +-- .../PinOutGroup/examples/trafficLight/trafficLight.ino | 2 -- libraries/PinOutGroup/library.json | 5 +++-- libraries/PinOutGroup/library.properties | 2 +- libraries/PinOutGroup/test/unit_test_001.cpp | 9 +++++++-- 10 files changed, 24 insertions(+), 20 deletions(-) diff --git a/libraries/PinOutGroup/LICENSE b/libraries/PinOutGroup/LICENSE index d29d575f..4231b05c 100644 --- a/libraries/PinOutGroup/LICENSE +++ b/libraries/PinOutGroup/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2021 Rob Tillaart +Copyright (c) 2017-2022 Rob Tillaart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/libraries/PinOutGroup/PinOutGroup.cpp b/libraries/PinOutGroup/PinOutGroup.cpp index ac5f6bf8..bd4651e3 100644 --- a/libraries/PinOutGroup/PinOutGroup.cpp +++ b/libraries/PinOutGroup/PinOutGroup.cpp @@ -1,7 +1,7 @@ // // FILE: PinOutGroup.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.1.5 +// VERSION: 0.1.6 // DATE: 2017-04-26 // PURPOSE: PinOutGroup library for Arduino // goal is to easily change a group of pins that logically @@ -14,8 +14,8 @@ // // 0.1.0 20-08-2017 initial version (based upon experimental pinGroup) // 0.1.1 2020-05-19 main refactor; -// added tests; added clear(); added write(idx, value) -// renamed set to write() to be in line with digitalWrite() +// added tests; added clear(); added write(idx, value) +// renamed set to write() to be in line with digitalWrite() // 0.1.2 2020-06-19 fix library.json // 0.1.3 2021-01-05 add Arduino-CI + unit test // 0.1.4 2021-01-22 @@ -25,6 +25,7 @@ // renamed variables for readability // add getIndex() to replace getIdx(), // add getMaxSize(), +// 0.1.6 2021-12-23 update library.json, license, minor edits #include "PinOutGroup.h" @@ -155,5 +156,5 @@ uint8_t PinOutGroup::getIndex(uint8_t pin) } - // --- END OF FILE --- + diff --git a/libraries/PinOutGroup/PinOutGroup.h b/libraries/PinOutGroup/PinOutGroup.h index 87d4fdee..452ebcd7 100644 --- a/libraries/PinOutGroup/PinOutGroup.h +++ b/libraries/PinOutGroup/PinOutGroup.h @@ -1,7 +1,7 @@ #pragma once // FILE: PinOutGroup.h // AUTHOR: Rob Tillaart -// VERSION: 0.1.5 +// VERSION: 0.1.6 // DATE: 2017-04-26 // PURPOSE: PinOutGroup library for Arduino // URL: https://github.com/RobTillaart/PinOutGroup @@ -11,12 +11,12 @@ #include "Arduino.h" -#define PINOUTGROUP_LIB_VERSION (F("0.1.5")) +#define PINOUTGROUP_LIB_VERSION (F("0.1.6")) // smaller MAXSIZE will reduce memory footprint with ditto bytes. #ifndef PINOUTGROUP_MAXSIZE -#define PINOUTGROUP_MAXSIZE 16 +#define PINOUTGROUP_MAXSIZE 16 #endif @@ -63,4 +63,6 @@ private: uint8_t _size = 0; }; + // -- END OF FILE -- + diff --git a/libraries/PinOutGroup/examples/led13/led13.ino b/libraries/PinOutGroup/examples/led13/led13.ino index 585a4380..aa879400 100644 --- a/libraries/PinOutGroup/examples/led13/led13.ino +++ b/libraries/PinOutGroup/examples/led13/led13.ino @@ -1,6 +1,5 @@ // FILE: led13.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.1 // PURPOSE: demo pinOutGroup library for Arduino // blink the build in led by means of a PinOutGroup @@ -40,3 +39,4 @@ void loop() // -- END OF FILE -- + diff --git a/libraries/PinOutGroup/examples/sevenSegment/sevenSegment.ino b/libraries/PinOutGroup/examples/sevenSegment/sevenSegment.ino index 8a7b3b65..e5f58908 100644 --- a/libraries/PinOutGroup/examples/sevenSegment/sevenSegment.ino +++ b/libraries/PinOutGroup/examples/sevenSegment/sevenSegment.ino @@ -1,8 +1,6 @@ // FILE: sevenSegment.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo PinOutGroup library for Arduino -// #include "PinOutGroup.h" diff --git a/libraries/PinOutGroup/examples/testPinOutGroup/testPinOutGroup.ino b/libraries/PinOutGroup/examples/testPinOutGroup/testPinOutGroup.ino index 2d75b507..9d0d3560 100644 --- a/libraries/PinOutGroup/examples/testPinOutGroup/testPinOutGroup.ino +++ b/libraries/PinOutGroup/examples/testPinOutGroup/testPinOutGroup.ino @@ -1,8 +1,6 @@ // FILE: testPinOutGroup.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.2 // PURPOSE: demo PinOutGroup library for Arduino -// #include "PinOutGroup.h" @@ -396,3 +394,4 @@ void test8() // -- END OF FILE -- + diff --git a/libraries/PinOutGroup/examples/trafficLight/trafficLight.ino b/libraries/PinOutGroup/examples/trafficLight/trafficLight.ino index 7beec95e..f37bac55 100644 --- a/libraries/PinOutGroup/examples/trafficLight/trafficLight.ino +++ b/libraries/PinOutGroup/examples/trafficLight/trafficLight.ino @@ -1,8 +1,6 @@ // FILE: trafficLight.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo PinOutGroup library for Arduino -// #include "PinOutGroup.h" diff --git a/libraries/PinOutGroup/library.json b/libraries/PinOutGroup/library.json index 08b56f3c..b3178ba6 100644 --- a/libraries/PinOutGroup/library.json +++ b/libraries/PinOutGroup/library.json @@ -15,8 +15,9 @@ "type": "git", "url": "https://github.com/RobTillaart/PinOutGroup.git" }, - "version": "0.1.5", + "version": "0.1.6", "license": "MIT", "frameworks": "arduino", - "platforms": "*" + "platforms": "*", + "headers": "PinOutGroup.h" } diff --git a/libraries/PinOutGroup/library.properties b/libraries/PinOutGroup/library.properties index 4a62d11f..830ade8a 100644 --- a/libraries/PinOutGroup/library.properties +++ b/libraries/PinOutGroup/library.properties @@ -1,5 +1,5 @@ name=PinOutGroup -version=0.1.5 +version=0.1.6 author=Rob Tillaart maintainer=Rob Tillaart sentence=A class that groups output pins so they can be updated easier and slightly faster on average. diff --git a/libraries/PinOutGroup/test/unit_test_001.cpp b/libraries/PinOutGroup/test/unit_test_001.cpp index 6f77896c..c1448b9a 100644 --- a/libraries/PinOutGroup/test/unit_test_001.cpp +++ b/libraries/PinOutGroup/test/unit_test_001.cpp @@ -38,8 +38,10 @@ unittest_setup() { + fprintf(stderr, "PINOUTGROUP_LIB_VERSION: %s\n", (char *) PINOUTGROUP_LIB_VERSION); } + unittest_teardown() { } @@ -47,20 +49,23 @@ unittest_teardown() unittest(test_all) { - fprintf(stderr, "VERSION: %s\n", (char *) PINOUTGROUP_LIB_VERSION); - PinOutGroup POG; uint8_t ar[46] = {2, 3, 4, 5, 6, 7}; assertEqual(0, POG.size()); assertEqual(16, POG.available()); + assertEqual(16, POG.getMaxSize()); assertFalse(POG.isInGroup(2)); POG.add(6, ar, LOW); assertEqual(6, POG.size()); assertEqual(10, POG.available()); + assertEqual(16, POG.getMaxSize()); + assertTrue(POG.isInGroup(2)); } + unittest_main() + // --------