From 388b799c70a4bd47b97ce3b27a7d015808591400 Mon Sep 17 00:00:00 2001 From: ouki-wang <358023925@qq.com> Date: Wed, 28 Nov 2018 16:53:09 +0800 Subject: [PATCH] V1.0 --- DFRobot_AS3935_I2C.cpp | 2 +- RaspberryPi/Python/DFRobot_AS3935_Lib.py | 2 +- RaspberryPi/Python/README.md | 2 +- RaspberryPi/Python/example/DFRobot_AS3935_detailed.py | 2 +- .../DFRobot_AS3935_lightning_sensor_detailed.ino | 2 +- readme.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DFRobot_AS3935_I2C.cpp b/DFRobot_AS3935_I2C.cpp index 7e23d8a..b499b39 100644 --- a/DFRobot_AS3935_I2C.cpp +++ b/DFRobot_AS3935_I2C.cpp @@ -272,7 +272,7 @@ void DFRobot_AS3935_I2C::setWatchdogThreshold(uint8_t wdth) // This function is used to modify WDTH. It is used to increase robustness to disturbers, // though will make detection less efficient (see page 19, Fig 20 of datasheet) // WDTH register: add 0x01, bits 3:0 - // default value of 0001 + // default value of 0010 // values should only be between 0x00 and 0x0F (0 and 7) singRegWrite(0x01, 0x0F, (wdth & 0x0F)); } diff --git a/RaspberryPi/Python/DFRobot_AS3935_Lib.py b/RaspberryPi/Python/DFRobot_AS3935_Lib.py index cca3de9..afa564c 100644 --- a/RaspberryPi/Python/DFRobot_AS3935_Lib.py +++ b/RaspberryPi/Python/DFRobot_AS3935_Lib.py @@ -185,7 +185,7 @@ class DFRobot_AS3935: #This function is used to read WDTH. It is used to increase robustness to disturbers, #though will make detection less efficient (see page 19, Fig 20 of datasheet) #WDTH register: add 0x01, bits 3:0 - #default value of 0001 + #default value of 0010 #values should only be between 0x00 and 0x0F (0 and 7) self.singRegRead(0x01) return self.register[0] & 0x0F diff --git a/RaspberryPi/Python/README.md b/RaspberryPi/Python/README.md index 7028320..58063ec 100644 --- a/RaspberryPi/Python/README.md +++ b/RaspberryPi/Python/README.md @@ -120,7 +120,7 @@ def getNoiseFloorLv1(self); /* * @brief Set an anti-interference rating * - * @param 0~7,More than 7 will use the default value:1 + * @param 0~7,More than 7 will use the default value:2 */ def setWatchdogThreshold(self, wdth); diff --git a/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py b/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py index 65d5c16..2eeee53 100644 --- a/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py +++ b/RaspberryPi/Python/example/DFRobot_AS3935_detailed.py @@ -69,7 +69,7 @@ sensor.setNoiseFloorLv1(2) #noiseLv = sensor.getNoiseFloorLv1() #used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7) -sensor.setWatchdogThreshold(1) +sensor.setWatchdogThreshold(2) #wtdgThreshold = sensor.getWatchdogThreshold() #used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7) diff --git a/examples/DFRobot_AS3935_lightning_sensor_detailed/DFRobot_AS3935_lightning_sensor_detailed.ino b/examples/DFRobot_AS3935_lightning_sensor_detailed/DFRobot_AS3935_lightning_sensor_detailed.ino index 0c3fbb6..dfc60b0 100644 --- a/examples/DFRobot_AS3935_lightning_sensor_detailed/DFRobot_AS3935_lightning_sensor_detailed.ino +++ b/examples/DFRobot_AS3935_lightning_sensor_detailed/DFRobot_AS3935_lightning_sensor_detailed.ino @@ -82,7 +82,7 @@ void setup() //uint8_t noiseLv = lightning0.getNoiseFloorLvl(); //used to modify WDTH,alues should only be between 0x00 and 0x0F (0 and 7) - lightning0.setWatchdogThreshold(1); + lightning0.setWatchdogThreshold(2); //uint8_t wtdgThreshold = lightning0.getWatchdogThreshold(); //used to modify SREJ (spike rejection),values should only be between 0x00 and 0x0F (0 and 7) diff --git a/readme.md b/readme.md index d2375be..09a9283 100644 --- a/readme.md +++ b/readme.md @@ -160,7 +160,7 @@ uint8_t getNoiseFloorLvl(void); /* * @brief Set an anti-interference rating * - * @param 0~7,More than 7 will use the default value:1 + * @param 0~7,More than 7 will use the default value:2 */ void setWatchdogThreshold(uint8_t wdth);