diff --git a/libraries/weight/.arduino-ci.yml b/libraries/weight/.arduino-ci.yml index a09e5128..1f989667 100644 --- a/libraries/weight/.arduino-ci.yml +++ b/libraries/weight/.arduino-ci.yml @@ -1,12 +1,29 @@ +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 - - mega2560 + # - mega2560 + - rpipico diff --git a/libraries/weight/CHANGELOG.md b/libraries/weight/CHANGELOG.md new file mode 100644 index 00000000..d330434a --- /dev/null +++ b/libraries/weight/CHANGELOG.md @@ -0,0 +1,29 @@ +# Change Log tinySHT2x + +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.1.4] - 2022-11-26 +- Add RP2040 support to build-CI. +- Add CHANGELOG.md +- update readme.md + + +## [0.1.3] - 2021-12-29 +- update library.json +- update readme.md +- update license +- minor edits + +## [0.1.2] - 2021-01-09 +- fix URL + +## [0.1.1] - 2021-01-09 +- add Arduino-CI + unit test + +## [0.1.0] - 2020-06-16 +- initial version + diff --git a/libraries/weight/README.md b/libraries/weight/README.md index 90021a77..d1d1ff4d 100644 --- a/libraries/weight/README.md +++ b/libraries/weight/README.md @@ -55,20 +55,31 @@ Functions are straightforward. See examples -## Future (TBD) +## Future +#### must - improve documentation + +#### should +- a class like the temperature convertor and pressure convertor + - internally grams? + - getters setters + +#### could +- create data types of stone lbs kilo etc.? + +#### won't (unless) +- large masses - sun planets ? (see relativity library) +- gravity constants of planets REL or ABS eg REL_GRAVITY_EARTH 1.0 - mass of all elements - an array of floats - a compressed format with access function (1 byte/ element) - constants e.g. MASS_OXYGEN + - separate periodicTable.h file ? - molarity functions - mass of common substances. -- large masses - sun planets ? -- gravity constants of planets REL or ABS eg REL_GRAVITY_EARTH 1.0 - teaspoon - - although that is a volume unit. + - that is a volume unit. - volume conversion too? -- create data types of stone lbs kilo etc.? diff --git a/libraries/weight/library.json b/libraries/weight/library.json index 492aaa43..d2cd3d43 100644 --- a/libraries/weight/library.json +++ b/libraries/weight/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/weight" }, - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "frameworks": "arduino", "platforms": "*", diff --git a/libraries/weight/library.properties b/libraries/weight/library.properties index d0ee7e48..b1d6b282 100644 --- a/libraries/weight/library.properties +++ b/libraries/weight/library.properties @@ -1,5 +1,5 @@ name=weight -version=0.1.3 +version=0.1.4 author=Rob Tillaart maintainer=Rob Tillaart sentence=Library of weight conversion functions diff --git a/libraries/weight/weight.h b/libraries/weight/weight.h index 0e2b016d..fc683bc4 100644 --- a/libraries/weight/weight.h +++ b/libraries/weight/weight.h @@ -2,21 +2,15 @@ // // FILE: weight.h // AUTHOR: Rob Tillaart -// VERSION: 0.1.3 +// VERSION: 0.1.4 // PURPOSE: Collection weight conversion functions // URL: https://github.com/RobTillaart/weight -// -// HISTORY: -// 0.1.0 2020-06-16 initial version -// 0.1.1 2021-01-09 add Arduino-CI + unit test -// 0.1.2 2021-01-09 fix URL -// 0.1.3 2021-12-29 update library.json, license, minor edits #include "Arduino.h" -#define WEIGHT_LIB_VERSION (F("0.1.3")) +#define WEIGHT_LIB_VERSION (F("0.1.4")) float lbs2kilo(float lbs) { return lbs * 0.45359237; }; @@ -38,7 +32,7 @@ float stone2kilo(float stone) { return stone * 6.35029318; }; float kilo2stone(float kilo) { return kilo * 0.157473044; }; -// returns kilo +// returns kilo float US2metric(float stone, float lbs, float ounce) { float kilo = stone * 6.35029318; @@ -48,7 +42,7 @@ float US2metric(float stone, float lbs, float ounce) }; -// returns lbs; +// returns lbs; float metric2US(float kilo, float &stone, float &lbs, float &ounce) { float val = kilo * 2.20462262;