Closed IshikawaHiroshi closed 9 years ago
Hi @IshikawaHiroshi - Thanks for finding these issues. I've fixed the first part, but could you elaborate on what's broken in part 2?
I read the documentation as though nothing should be modifying the 0x08 register other than us. If that's true, then adding the extra read seems like it might slow things down when we don't need to. Could you explain what I'm missing here?
I'm sorry. I experimented on part 2 once again. It was my misunderstanding. It wasn't necessary to add self.read_data(). Thank you very much for your quick answer.
Thanks for getting back to me so quickly.
I've pushed an updated version (0.1.0) to PyPI that contains the fix. Thanks again for your help.
I'd like to make a comment once again about part 2. Next is test program setting 32pF.
from RPi_AS3935 import RPi_AS3935 sensor = RPi_AS3935(address=0x00, bus=1) sensor.calibrate(tun_cap=0x04) #32pF sensor.read_data() print (sensor.registers[0x08])
4 has to be printout, but 0 is output. To avoid this ,as it was proposed last time, inside "def calibrate(self, tun_cap=None)", self.read_data () should be added.
I think this was fixed by moving the read to before the first time we set 0x08 bit 5.
I've uploaded a new version to PyPI and tagged it - let me know if you're still having issues.
Thank you very much. I agree to new version.
Thank you very much for your wonderful Python library about AS3935.
When I installed AS3935 library on RaspberryPi and experimented, there were several defects, so it'll be reported.
About class RPi_AS3935