diff --git a/libraries/DistanceTable/.arduino-ci.yml b/libraries/DistanceTable/.arduino-ci.yml index e7cb4633..10c0e10b 100644 --- a/libraries/DistanceTable/.arduino-ci.yml +++ b/libraries/DistanceTable/.arduino-ci.yml @@ -1,3 +1,18 @@ +platforms: + rpipico: + board: rp2040:rp2040:rpipico + package: rp2040:rp2040 + gcc: + features: + defines: + - ARDUINO_ARCH_RP2040 + warnings: + flags: + +packages: + rp2040:rp2040: + url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + compile: # Choosing to run compilation tests on 2 different Arduino platforms platforms: @@ -8,4 +23,6 @@ compile: - m4 - esp32 # - esp8266 - # - mega2560 \ No newline at end of file + # - mega2560 + - rpipico + diff --git a/libraries/DistanceTable/CHANGELOG.md b/libraries/DistanceTable/CHANGELOG.md new file mode 100644 index 00000000..51112fb5 --- /dev/null +++ b/libraries/DistanceTable/CHANGELOG.md @@ -0,0 +1,72 @@ +# Change Log DistanceTable + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + + +## [0.3.2] - 2022-11.02 +- add changelog.md +- add rp2040 to build-CI +- update readme.md + +## [0.3.1] - 2022-07-22 +- fix set() get() test order +- set() returns bool on success. +- adds sum() and average() +- add Pascal Triangle example. + +## [0.3.0] - 2022-01-06 +- add invert flag, add unit tests +- add countAbove(), countBelow() +- fix allocation + # elements + +---- + +## [0.2.2] - 2021-12-17 +- update license +- update readme.md +- minor edits + +## [0.2.1] - 2021-10-26 +- update build-CI +- update readme.md +- default value in constructor + +## [0.2.0] - 2021-01-19 +- refactor +- properly named functions, +- add setAll() +- add minimum(), maximum() +- add count() + +---- + +## [0.1.6] - 2020-12-20 +- Arduino-CI + unit test + +## [0.1.5] - 2020-06-07 +- fix library.json +- minor edits + +## [0.1.4] - 2019-01-10 +- add size() + +## [0.1.3] - 2017-07-27 +- Fix issue #33 + +## [0.1.2] +- fix overflow +- add some error detection +- revert float to float to memory + +## [0.1.01] +- refactor + +## [0.1.00] +- initial version + + + + diff --git a/libraries/DistanceTable/DistanceTable.cpp b/libraries/DistanceTable/DistanceTable.cpp index 674a350d..94984d8f 100644 --- a/libraries/DistanceTable/DistanceTable.cpp +++ b/libraries/DistanceTable/DistanceTable.cpp @@ -1,32 +1,11 @@ // // FILE: DistanceTable.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.3.1 +// VERSION: 0.3.2 // PURPOSE: Arduino library to store a symmetrical distance table in less memory // URL: https://github.com/RobTillaart/DistanceTable - -// HISTORY -// 0.1.00 initial version -// 0.1.01 refactor -// 0.1.2 fix overflow; add some error detection; revert float to float to memory -// 0.1.3 2017-07-27 Fix issue #33 -// 0.1.4 2019-01-10 add size() -// 0.1.5 2020-06-07 fix library.json, minor edits -// 0.1.6 2020-12-20 Arduino-CI + unit test -// 0.2.0 2021-01-19 refactor -// properly named functions, -// add setAll(), minimum(), maximum() and count() -// 0.2.1 2021-10-26 update build-CI, update readme.md -// default value in constructor -// 0.2.2 2021-12-17 update license, readme, minor edits -// 0.3.0 2022-01-06 add invert flag, add unit tests -// add countAbove(), countBelow() -// fix allocation + # elements -// 0.3.1 2022-07-22 fix set() get() test order -// set() returns bool on success. -// adds sum() and average() -// add Pascal Triangle example. - +// +// HISTORY: see changelog.md #include "DistanceTable.h" diff --git a/libraries/DistanceTable/DistanceTable.h b/libraries/DistanceTable/DistanceTable.h index 54ee92c0..223c0864 100644 --- a/libraries/DistanceTable/DistanceTable.h +++ b/libraries/DistanceTable/DistanceTable.h @@ -2,7 +2,7 @@ // // FILE: DistanceTable.h // AUTHOR: Rob Tillaart -// VERSION: 0.3.1 +// VERSION: 0.3.2 // PURPOSE: Arduino library to store a symmetrical distance table in less memory // URL: https://github.com/RobTillaart/DistanceTable // @@ -11,7 +11,7 @@ #include "Arduino.h" -#define DISTANCETABLE_LIB_VERSION (F("0.3.1")) +#define DISTANCETABLE_LIB_VERSION (F("0.3.2")) class DistanceTable @@ -31,31 +31,31 @@ public: bool getInvert() { return _invert; }; - // minimum and maximum skip x == y pairs as these are 0. + // minimum and maximum skip x == y pairs as these are 0. float minimum(uint8_t &x, uint8_t &y); float maximum(uint8_t &x, uint8_t &y); float sum(); float average(); - // epsilon allows 'almost equal' searches - // if (invert == false) count counts both (x,y) and (y,x) => always even nr. - // if (invert == true) count counts (x,y) and (y,x) separately. - // count skips x == y pairs so counting zero's is missing the diagonal. + // epsilon allows 'almost equal' searches + // if (invert == false) count counts both (x,y) and (y,x) => always even nr. + // if (invert == true) count counts (x,y) and (y,x) separately. + // count skips x == y pairs so counting zero's is missing the diagonal. uint16_t count(float value, float epsilon = 0.0); uint16_t countAbove(float value); uint16_t countBelow(float value); - // debug - // default dumps to Serial but other stream are possible + // debug + // default dumps to Serial but other stream are possible void dump(Print * stream = &Serial); uint8_t dimension() { return _dimension; }; uint16_t elements() { return _elements; }; uint16_t memoryUsed() { return _elements * sizeof(float); }; -// Obsolete in future + // Obsolete in future 0.4.0 uint16_t size() { return memoryUsed(); }; protected: diff --git a/libraries/DistanceTable/library.json b/libraries/DistanceTable/library.json index 0b3fa7bb..37207c55 100644 --- a/libraries/DistanceTable/library.json +++ b/libraries/DistanceTable/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/DistanceTable" }, - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "frameworks": "arduino", "platforms": "*", diff --git a/libraries/DistanceTable/library.properties b/libraries/DistanceTable/library.properties index dd402fce..9a751de9 100644 --- a/libraries/DistanceTable/library.properties +++ b/libraries/DistanceTable/library.properties @@ -1,5 +1,5 @@ name=DistanceTable -version=0.3.1 +version=0.3.2 author=Rob Tillaart maintainer=Rob Tillaart sentence=Library for a memory efficient DistanceTable for Arduino.