From 3f53aa72d703894cd593e63cccffc3d639ea63eb Mon Sep 17 00:00:00 2001 From: BiffoBear Date: Thu, 11 Mar 2021 11:22:47 +0000 Subject: [PATCH] Corrected error in example code and removed note that repo not in PyPi. --- README.rst | 5 +---- examples/as3935_simpletest.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 4bb4ee4..f21aa5b 100644 --- a/README.rst +++ b/README.rst @@ -42,9 +42,6 @@ or individual libraries can be installed using Installing from PyPI ===================== -.. note:: This library is not available on PyPI yet. Install documentation is included - as a standard element. Stay tuned for PyPI availability! - On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from PyPI `_. To install for current user: @@ -118,7 +115,7 @@ For a SPI connection: if sensor.interrupt_set: # An event has occurred # The interrupt_status is cleared after a read, so assign it # to a variable in case you need the value later. - event_type = sensor.interrupt_status == sensor.LIGHTNING + event_type = sensor.interrupt_status if event_type == sensor.LIGHTNING: # It's a lightning event print(f"Strike Energy = {sensor.energy}") print(f"Distance to storm front = {sensor.distance} km") diff --git a/examples/as3935_simpletest.py b/examples/as3935_simpletest.py index 373c58f..0120e72 100755 --- a/examples/as3935_simpletest.py +++ b/examples/as3935_simpletest.py @@ -28,7 +28,7 @@ if sensor.interrupt_set: # An event has occurred # The interrupt_status is cleared after a read, so assign it # to a variable in case you need the value later. - event_type = sensor.interrupt_status == sensor.LIGHTNING + event_type = sensor.interrupt_status if event_type == sensor.LIGHTNING: # It's a lightning event print(f"Strike Energy = {sensor.energy}") print(f"Distance to storm front = {sensor.distance} km")