diff --git a/LICENSE b/LICENSE index d29d575..4231b05 100644 --- a/LICENSE +++ b/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/README.md b/README.md index 9e21007..d651178 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ # Temperature -Arduino library with dewPoint, humidex, heatIndex and windchill functions. +Arduino library with dewPoint, humidex, heatIndex and wind-chill functions. ## Description @@ -25,22 +25,22 @@ DHT22 or Sensirion, to make a weather station application. ### Conversion -- **float Fahrenheit(float celsius)** idem. -- **float Celsius(float fahrenheit)** idem. -- **float Kelvin(float celsius)** idem. +- **float Fahrenheit(float Celsius)** idem. +- **float Celsius(float Fahrenheit)** idem. +- **float Kelvin(float Celsius)** idem. ### DewPoint, humidex -- **float dewPoint(float celsius, float humidity)** idem. -- **float dewPointFast(float celsius, float humidity)** idem. -- **float humidex(float celsius, float dewPoint)** idem. +- **float dewPoint(float Celsius, float humidity)** idem. +- **float dewPointFast(float Celsius, float humidity)** idem. +- **float humidex(float Celsius, float dewPoint)** idem. ### heatIndex -- **float heatIndex(float fahrenheit, float humidity)** idem. -- **float heatIndexC(float celsius, float humidity)** idem. +- **float heatIndex(float Fahrenheit, float humidity)** idem. +- **float heatIndexC(float Celsius, float humidity)** idem. ### WindChill @@ -48,9 +48,9 @@ DHT22 or Sensirion, to make a weather station application. Wind speed @ 10 meter, if **convert** is true => wind speed will be converted to 1.5 meter else ==> formula assumes wind speed @ 1.5 meter -- **float WindChill_F_mph(float fahrenheit, float milesPerHour, bool convert = true)** -- **float WindChill_C_kmph(float celcius, float kilometerPerHour, bool convert = true)** -- **float WindChill_C_mps(float celsius, float meterPerSecond, bool convert = true)** +- **float WindChill_F_mph(float Fahrenheit, float milesPerHour, bool convert = true)** +- **float WindChill_C_kmph(float Celsius, float kilometerPerHour, bool convert = true)** +- **float WindChill_C_mps(float Celsius, float meterPerSecond, bool convert = true)** ## Operations @@ -65,6 +65,7 @@ See examples for typical usage. # Future +- improve documentation - expand number of formulas - diff --git a/examples/dewpoint_test/dewpoint_test.ino b/examples/dewpoint_test/dewpoint_test.ino index 067bfdb..bacd927 100644 --- a/examples/dewpoint_test/dewpoint_test.ino +++ b/examples/dewpoint_test/dewpoint_test.ino @@ -1,7 +1,6 @@ // // FILE: dewpoint_test.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-04 @@ -16,6 +15,7 @@ uint32_t duration2; float maxError; volatile float dp; + void setup() { Serial.begin(115200); diff --git a/examples/heatindexC_table/heatindexC_table.ino b/examples/heatindexC_table/heatindexC_table.ino index 24b830d..2b3c610 100644 --- a/examples/heatindexC_table/heatindexC_table.ino +++ b/examples/heatindexC_table/heatindexC_table.ino @@ -1,7 +1,6 @@ // // FILE: heatindexC_table.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-04 @@ -11,6 +10,7 @@ volatile float hi; + void setup() { Serial.begin(115200); diff --git a/examples/heatindexC_test/heatindexC_test.ino b/examples/heatindexC_test/heatindexC_test.ino index 78b1a68..448b8c1 100644 --- a/examples/heatindexC_test/heatindexC_test.ino +++ b/examples/heatindexC_test/heatindexC_test.ino @@ -1,7 +1,6 @@ // // FILE: heatindexC_test.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-04 @@ -14,6 +13,7 @@ uint32_t duration1; volatile float hi; + void setup() { Serial.begin(115200); diff --git a/examples/heatindex_table/heatindex_table.ino b/examples/heatindex_table/heatindex_table.ino index 4a10183..029db2a 100644 --- a/examples/heatindex_table/heatindex_table.ino +++ b/examples/heatindex_table/heatindex_table.ino @@ -1,7 +1,6 @@ // // FILE: heatindex_table.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-04 @@ -11,6 +10,7 @@ volatile float hi; + void setup() { Serial.begin(115200); diff --git a/examples/heatindex_test/heatindex_test.ino b/examples/heatindex_test/heatindex_test.ino index 3f05f51..9b29df9 100644 --- a/examples/heatindex_test/heatindex_test.ino +++ b/examples/heatindex_test/heatindex_test.ino @@ -1,10 +1,9 @@ // // FILE: heatIndex_test.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-04 -// + #include "temperature.h" @@ -13,6 +12,7 @@ uint32_t duration1; volatile float hi; + void setup() { Serial.begin(115200); diff --git a/examples/humidex_table/humidex_table.ino b/examples/humidex_table/humidex_table.ino index 2803c34..5a0c1e5 100644 --- a/examples/humidex_table/humidex_table.ino +++ b/examples/humidex_table/humidex_table.ino @@ -1,7 +1,6 @@ // // FILE: humidex_table.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-05 diff --git a/examples/humidex_test/humidex_test.ino b/examples/humidex_test/humidex_test.ino index 0aaedf9..f54f2c3 100644 --- a/examples/humidex_test/humidex_test.ino +++ b/examples/humidex_test/humidex_test.ino @@ -1,7 +1,6 @@ // // FILE: humidex_test.ino // AUTHOR: Rob Tillaart -// VERSION: 0.1.0 // PURPOSE: demo // DATE: 2020-04-05 @@ -14,6 +13,7 @@ uint32_t duration1; volatile float hi; + void setup() { Serial.begin(115200); diff --git a/library.json b/library.json index 564608e..0e3ec48 100644 --- a/library.json +++ b/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/Temperature" }, - "version": "0.2.4", + "version": "0.2.5", "license": "MIT", "frameworks": "arduino", "platforms": "*", diff --git a/library.properties b/library.properties index 5e31641..d42217e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Temperature -version=0.2.4 +version=0.2.5 author=Rob Tillaart maintainer=Rob Tillaart sentence=Library with weather related functions. diff --git a/temperature.h b/temperature.h index 38d9749..6a30ddc 100644 --- a/temperature.h +++ b/temperature.h @@ -1,8 +1,9 @@ #pragma once // // FILE: temperature.h -// VERSION: 0.2.4 -// PURPOSE: temperature functions +// VERSION: 0.2.5 +// DATE: 2015-03-29 +// PURPOSE: collection temperature functions // // HISTORY: // 0.1.0 2015-03-29 initial version @@ -10,13 +11,14 @@ // 0.2.0 2020-04-04 #pragma once, removed WProgram.h, readme.md, comments // replaced obsolete links with new ones, // tested and removed some code -// 0.2.1 2020-05-26 added windchill formulas +// 0.2.1 2020-05-26 added wind-chill formulas // 0.2.2 2020-06-19 fix library.json // 0.2.3 2020-08-27 fix #5 order of functions, typo, fixed 1 example // 0.2.4 2021-01-08 Arduino-CI + unit tests +// 0.2.5 2021-12-28 Arduino-CI, library.json, readme.md, license, minor edits -#define TEMPERATURE_VERSION (F("0.2.4")) +#define TEMPERATURE_VERSION (F("0.2.5")) inline float Fahrenheit(float celsius) diff --git a/test/unit_test_001.cpp b/test/unit_test_001.cpp index 2558896..2ebfadc 100644 --- a/test/unit_test_001.cpp +++ b/test/unit_test_001.cpp @@ -40,8 +40,10 @@ unittest_setup() { + fprintf(stderr, "TEMPERATURE_VERSION: %s\n", (char *) TEMPERATURE_VERSION); } + unittest_teardown() { } @@ -49,8 +51,6 @@ unittest_teardown() unittest(test_conversion) { - fprintf(stderr, "TEMPERATURE_VERSION: %s\n", (char *) TEMPERATURE_VERSION); - assertEqualFloat(-40, Fahrenheit(-40), 0.001); assertEqualFloat(-40, Celsius(-40), 0.001); assertEqualFloat(273.15, Kelvin(0), 0.001);