From 415a7c0a1f27eeb43c930398681ba91003dbb0f2 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 29 Dec 2020 14:13:16 -0500 Subject: [PATCH 1/3] Update uv_index to uvs --- adafruit_ltr390.py | 4 ++-- examples/ltr390_alert_test.py | 2 +- examples/ltr390_configuration_example.py | 2 +- examples/ltr390_simpletest.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adafruit_ltr390.py b/adafruit_ltr390.py index 88296fc..2a3878a 100644 --- a/adafruit_ltr390.py +++ b/adafruit_ltr390.py @@ -293,8 +293,8 @@ def _mode(self, value): # something is wrong here; I had to add a sleep to the loop to get both to update correctly @property - def uv_index(self): - """The calculated UV Index""" + def uvs(self): + """The calculated UV value""" self._mode = UV while not self.data_ready: sleep(0.010) diff --git a/examples/ltr390_alert_test.py b/examples/ltr390_alert_test.py index 184aebc..a2a9362 100644 --- a/examples/ltr390_alert_test.py +++ b/examples/ltr390_alert_test.py @@ -18,7 +18,7 @@ while True: if ltr.threshold_passed: - print("UV Index:", ltr.uv_index) + print("UV:", ltr.uvs) print("threshold", THRESHOLD_VALUE, "passed!") print("") else: diff --git a/examples/ltr390_configuration_example.py b/examples/ltr390_configuration_example.py index 9c27a6d..76d19be 100644 --- a/examples/ltr390_configuration_example.py +++ b/examples/ltr390_configuration_example.py @@ -22,7 +22,7 @@ print("Measurement delay is", MeasurementDelay.string[ltr.measurement_delay]) print("") while True: - print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light) + print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light) # for shorter measurement delays you may need to make this sleep shorter to see a change time.sleep(1.0) diff --git a/examples/ltr390_simpletest.py b/examples/ltr390_simpletest.py index 7f1a1d2..ebd42ef 100644 --- a/examples/ltr390_simpletest.py +++ b/examples/ltr390_simpletest.py @@ -11,5 +11,5 @@ ltr = adafruit_ltr390.LTR390(i2c) while True: - print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light) + print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light) time.sleep(1.0) From 73132a7972cf9a5df470fc1fa2b1d77f334479ff Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 29 Dec 2020 14:16:51 -0500 Subject: [PATCH 2/3] Update README to match. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6afe6ae..0e15ed7 100644 --- a/README.rst +++ b/README.rst @@ -72,7 +72,7 @@ Usage Example ltr = adafruit_ltr390.LTR390(i2c) while True: - print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light) + print("UV", ltr.uvs, "\t\tAmbient Light:", ltr.light) time.sleep(1.0) From ee52d649e87552e8dae40ba6cbb9a3506e0ccf73 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 29 Dec 2020 14:19:13 -0500 Subject: [PATCH 3/3] Readd deleted : --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0e15ed7..655a123 100644 --- a/README.rst +++ b/README.rst @@ -72,7 +72,7 @@ Usage Example ltr = adafruit_ltr390.LTR390(i2c) while True: - print("UV", ltr.uvs, "\t\tAmbient Light:", ltr.light) + print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light) time.sleep(1.0)