0.1.4 weight

This commit is contained in:
rob tillaart 2022-11-27 11:13:09 +01:00
parent b6512a671a
commit a67908ac20
6 changed files with 72 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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.?

View File

@ -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": "*",

View File

@ -1,5 +1,5 @@
name=weight
version=0.1.3
version=0.1.4
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library of weight conversion functions

View File

@ -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;