From 5b303e0c054ead6d3356700ab40e6a6ac7c38a34 Mon Sep 17 00:00:00 2001 From: Benjamin Poulin <90342856+benjaminwp18@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:06:38 -0400 Subject: [PATCH 1/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2047a43..1de2338 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@ Returns True if read was successful, False otherwise. Get the most recent temperature measurement. sensor.temperature() # Get temperature in default units (Centigrade) - sensor.temperature(ms5837.UNITS_Farenheit) # Get temperature in Farenheit + sensor.temperature(tsys01.UNITS_Farenheit) # Get temperature in Farenheit Valid arguments are: tsys01.UNITS_Centigrade - tsys01.UNITS_Farenheit + tsys01.UNITS_Fahrenheit tsys01.UNITS_Kelvin Returns the most recent temperature in the requested units, or temperature in degrees Centigrade if invalid units specified. Call read() to update. From 0ec2108950ac78c5a2fa6cf4dd198e9080459ec0 Mon Sep 17 00:00:00 2001 From: Benjamin Poulin <90342856+benjaminwp18@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:08:22 -0400 Subject: [PATCH 2/4] Fix Fahrenheit typo --- tsys01/tsys01.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsys01/tsys01.py b/tsys01/tsys01.py index 64cdae5..75e704b 100644 --- a/tsys01/tsys01.py +++ b/tsys01/tsys01.py @@ -7,7 +7,7 @@ # Valid units UNITS_Centigrade = 1 -UNITS_Farenheit = 2 +UNITS_Fahrenheit = 2 UNITS_Kelvin = 3 @@ -73,7 +73,7 @@ def read(self): # Temperature in requested units # default degrees C def temperature(self, conversion=UNITS_Centigrade): - if conversion == UNITS_Farenheit: + if conversion == UNITS_Fahrenheit: return (9/5) * self._temperature + 32 elif conversion == UNITS_Kelvin: return self._temperature - 273 From 595f695e9f61fc91180b4680193398ddc2aaba90 Mon Sep 17 00:00:00 2001 From: Benjamin Poulin <90342856+benjaminwp18@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:08:54 -0400 Subject: [PATCH 3/4] Fahrenheit typo in example.py --- example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.py b/example.py index 385a516..c8fe75f 100644 --- a/example.py +++ b/example.py @@ -12,5 +12,5 @@ if not sensor.read(): print("Error reading sensor") exit(1) - print("Temperature: %.2f C\t%.2f F") % (sensor.temperature(), sensor.temperature(tsys01.UNITS_Farenheit)) - sleep(0.2) \ No newline at end of file + print("Temperature: %.2f C\t%.2f F") % (sensor.temperature(), sensor.temperature(tsys01.UNITS_Fahrenheit)) + sleep(0.2) From 302190e927df36ad90456174e3e54a256d63d538 Mon Sep 17 00:00:00 2001 From: Benjamin Poulin <90342856+benjaminwp18@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:10:07 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1de2338..3ab6860 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Returns True if read was successful, False otherwise. Get the most recent temperature measurement. sensor.temperature() # Get temperature in default units (Centigrade) - sensor.temperature(tsys01.UNITS_Farenheit) # Get temperature in Farenheit + sensor.temperature(tsys01.UNITS_Fahrenheit) # Get temperature in Fahrenheit Valid arguments are: