Skip to content

Commit

Permalink
update build-CI, library.json, readme, license, minor edits (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Dec 28, 2021
1 parent 6a6c1f7 commit e50eb99
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,32 +25,32 @@ 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

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
Expand All @@ -65,6 +65,7 @@ See examples for typical usage.

# Future

- improve documentation
- expand number of formulas
-

2 changes: 1 addition & 1 deletion examples/dewpoint_test/dewpoint_test.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: dewpoint_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-04

Expand All @@ -16,6 +15,7 @@ uint32_t duration2;
float maxError;
volatile float dp;


void setup()
{
Serial.begin(115200);
Expand Down
2 changes: 1 addition & 1 deletion examples/heatindexC_table/heatindexC_table.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: heatindexC_table.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-04

Expand All @@ -11,6 +10,7 @@

volatile float hi;


void setup()
{
Serial.begin(115200);
Expand Down
2 changes: 1 addition & 1 deletion examples/heatindexC_test/heatindexC_test.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: heatindexC_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-04

Expand All @@ -14,6 +13,7 @@ uint32_t duration1;

volatile float hi;


void setup()
{
Serial.begin(115200);
Expand Down
2 changes: 1 addition & 1 deletion examples/heatindex_table/heatindex_table.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: heatindex_table.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-04

Expand All @@ -11,6 +10,7 @@

volatile float hi;


void setup()
{
Serial.begin(115200);
Expand Down
4 changes: 2 additions & 2 deletions examples/heatindex_test/heatindex_test.ino
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
//
// FILE: heatIndex_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-04
//


#include "temperature.h"

Expand All @@ -13,6 +12,7 @@ uint32_t duration1;

volatile float hi;


void setup()
{
Serial.begin(115200);
Expand Down
1 change: 0 additions & 1 deletion examples/humidex_table/humidex_table.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: humidex_table.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-05

Expand Down
2 changes: 1 addition & 1 deletion examples/humidex_test/humidex_test.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// FILE: humidex_test.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: demo
// DATE: 2020-04-05

Expand All @@ -14,6 +13,7 @@ uint32_t duration1;

volatile float hi;


void setup()
{
Serial.begin(115200);
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Temperature
version=0.2.4
version=0.2.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library with weather related functions.
Expand Down
10 changes: 6 additions & 4 deletions temperature.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#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
// 0.1.1 2017-07-26 double to float (issue #33)
// 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)
Expand Down
4 changes: 2 additions & 2 deletions test/unit_test_001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@

unittest_setup()
{
fprintf(stderr, "TEMPERATURE_VERSION: %s\n", (char *) TEMPERATURE_VERSION);
}


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);
Expand Down

0 comments on commit e50eb99

Please sign in to comment.