diff --git a/libraries/PrintCharArray/.arduino-ci.yml b/libraries/PrintCharArray/.arduino-ci.yml index 919a5224..4856ce39 100644 --- a/libraries/PrintCharArray/.arduino-ci.yml +++ b/libraries/PrintCharArray/.arduino-ci.yml @@ -1,14 +1,32 @@ +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 + # selected only those that work platforms: - uno - - due - - zero - - leonardo + # - due + # - zero + # - leonardo - m4 - esp32 - # - esp8266 + - esp8266 # - mega2560 + - rpipico + # Declaring Dependent Arduino Libraries (to be installed via the Arduino Library Manager) libraries: - "XMLWriter" \ No newline at end of file diff --git a/libraries/PrintCharArray/CHANGELOG.md b/libraries/PrintCharArray/CHANGELOG.md new file mode 100644 index 00000000..0884af81 --- /dev/null +++ b/libraries/PrintCharArray/CHANGELOG.md @@ -0,0 +1,38 @@ +# Change Log PrintCharArray + +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.3] - 2022-11-22 +- add changelog.md +- add RP2040 to build-CI +- minor edit readme.md + + +## [0.3.2] - 2021-12-24 +- update library.json, license, minor edits + + +## [0.3.1] - 2021-11-13 update Arduino-CI, readme.md +- add conditional PRINTCHARARRAY_MAX_BUFFER_SIZE +- add write(char \* str, uint8_t length) Print interface. + +## [0.3.0] - 2021-01-06 +- Arduino-CI + unit test, free -> available() + +---- + +## [0.2.1] - 2020-06-19 fix library.json +## [0.2.0] - 2020-04-30 dynamic memory + +---- + +## [0.1.1] - 2020-04-28 +- minor optimization + +## [0.1.0] - 2017-12-07 +- initial version + diff --git a/libraries/PrintCharArray/PrintCharArray.h b/libraries/PrintCharArray/PrintCharArray.h index ab47faa7..c58e9e44 100644 --- a/libraries/PrintCharArray/PrintCharArray.h +++ b/libraries/PrintCharArray/PrintCharArray.h @@ -2,27 +2,17 @@ // // FILE: PrintCharArray.h // AUTHOR: Rob Tillaart -// VERSION: 0.3.2 +// VERSION: 0.3.3 // PURPOSE: Class that captures prints into a char array // DATE: 2017-12-07 // URL: https://github.com/RobTillaart/PrintCharArray -// -// HISTORY -// 0.1.0 2017-12-07 initial version -// 0.1.1 2020-04-28 minor optimization -// 0.2.0 2020-04-30 dynamic memory -// 0.2.1 2020-06-19 fix library.json -// 0.3.0 2021-01-06 Arduino-CI + unit test, free -> available() -// 0.3.1 2021-11-13 update Arduino-CI, readme.md -// add conditional PRINTCHARARRAY_MAX_BUFFER_SIZE -// add write(char * str, uint8_t length) Print interface. -// 0.3.2 2021-12-24 update library.json, license, minor edits +#include "Arduino.h" #include "Print.h" -#define PRINTCHARARRAY_VERSION (F("0.3.2")) +#define PRINTCHARARRAY_VERSION (F("0.3.3")) #ifndef PRINTCHARARRAY_MAX_BUFFER_SIZE #define PRINTCHARARRAY_MAX_BUFFER_SIZE 250 @@ -58,7 +48,7 @@ public: size_t write(uint8_t * str, uint8_t length) { - if ( (int(_index) + length) >= _bufSize) return 0; // does not fit. + if ( (int(_index) + length) >= _bufSize) return 0; // does not fit. uint8_t len = length; uint8_t i = 0; @@ -82,7 +72,7 @@ public: } - // int length() { return _index; }; // better as size()? + // int length() { return _index; }; // better as size()? int size() { return _index; @@ -109,5 +99,5 @@ private: }; -// -- END OF FILE -- +// -- END OF FILE -- diff --git a/libraries/PrintCharArray/library.json b/libraries/PrintCharArray/library.json index b86de7db..93428f29 100644 --- a/libraries/PrintCharArray/library.json +++ b/libraries/PrintCharArray/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/PrintCharArray.git" }, - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "frameworks": "arduino", "platforms": "*", diff --git a/libraries/PrintCharArray/library.properties b/libraries/PrintCharArray/library.properties index b96b571d..78c2cc39 100644 --- a/libraries/PrintCharArray/library.properties +++ b/libraries/PrintCharArray/library.properties @@ -1,5 +1,5 @@ name=PrintCharArray -version=0.3.2 +version=0.3.3 author=Rob Tillaart maintainer=Rob Tillaart sentence=Library to capture prints into a char array. diff --git a/libraries/PrintCharArray/readme.md b/libraries/PrintCharArray/readme.md index 43e288b5..b12a4098 100644 --- a/libraries/PrintCharArray/readme.md +++ b/libraries/PrintCharArray/readme.md @@ -51,7 +51,14 @@ See examples. ## Future +#### must +- documentation + +#### should +- move code to .cpp file - testing + +#### could - examples - inject spaces in "middle align" example? possible? - rename some