Skip to content

Commit c56b18c

Browse files
authored
Merge pull request #1 from kattni/uv_index_fix
Update uv_index to uvs
2 parents 582055a + ee52d64 commit c56b18c

5 files changed

+6
-6
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Usage Example
7272
ltr = adafruit_ltr390.LTR390(i2c)
7373
7474
while True:
75-
print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light)
75+
print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light)
7676
time.sleep(1.0)
7777
7878

adafruit_ltr390.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ def _mode(self, value):
293293

294294
# something is wrong here; I had to add a sleep to the loop to get both to update correctly
295295
@property
296-
def uv_index(self):
297-
"""The calculated UV Index"""
296+
def uvs(self):
297+
"""The calculated UV value"""
298298
self._mode = UV
299299
while not self.data_ready:
300300
sleep(0.010)

examples/ltr390_alert_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
while True:
1919

2020
if ltr.threshold_passed:
21-
print("UV Index:", ltr.uv_index)
21+
print("UV:", ltr.uvs)
2222
print("threshold", THRESHOLD_VALUE, "passed!")
2323
print("")
2424
else:

examples/ltr390_configuration_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
print("Measurement delay is", MeasurementDelay.string[ltr.measurement_delay])
2323
print("")
2424
while True:
25-
print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light)
25+
print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light)
2626

2727
# for shorter measurement delays you may need to make this sleep shorter to see a change
2828
time.sleep(1.0)

examples/ltr390_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
ltr = adafruit_ltr390.LTR390(i2c)
1212

1313
while True:
14-
print("UV Index:", ltr.uv_index, "\t\tAmbient Light:", ltr.light)
14+
print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr.light)
1515
time.sleep(1.0)

0 commit comments

Comments
 (0)