From 0e1fa878b5c4a8ee46396d44405467b29953d198 Mon Sep 17 00:00:00 2001 From: wspi Date: Sun, 29 Oct 2023 19:21:39 -0300 Subject: [PATCH] fixing manual_cal function names --- python/raspberrypi/DFRobot_AS3935_Lib.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python/raspberrypi/DFRobot_AS3935_Lib.py b/python/raspberrypi/DFRobot_AS3935_Lib.py index 1bbdcca..f9a90af 100644 --- a/python/raspberrypi/DFRobot_AS3935_Lib.py +++ b/python/raspberrypi/DFRobot_AS3935_Lib.py @@ -33,20 +33,20 @@ class DFRobot_AS3935: @param disturber Enable/disable disturber detection ''' def manual_cal(self, capacitance, location, disturber): - self.powerUp() - if location == 1: - self.setIndoors() + self.power_up() + if location == 0: + self.set_indoors() else: - self.setOutdoors() + self.set_outdoors() if disturber == 0: - self.disturberDis() + self.disturber_dis() else: - self.disturberEn() + self.disturber_en() - self.setIrqOutputSource(0) + self.set_irq_output_source(0) time.sleep(0.5) - self.setTuningCaps(capacitance) + self.set_tuning_caps(capacitance) def set_tuning_caps(self, capVal): #Assume only numbers divisible by 8 (because that's all the chip supports) @@ -74,7 +74,7 @@ class DFRobot_AS3935: time.sleep(0.002) '''! - @brief Disturber detection enabled + @brief Set to the indoor model ''' def set_indoors(self): self.sing_reg_write(0x00, 0x3E, 0x24)