There is a simple error on the line https://github.com/ecodina/python_as3935/blob/master/as3935/AS3935.py#L144
It is:
self.write_byte(0x01, (self.read_byte(0x01) & 0x11110000) | value)
Should be:
self.write_byte(0x01, (self.read_byte(0x01) & 0b11110000) | value)
The error causes reset of NF_LEV to 0, when you use set_watchdog_threshold().
There is a simple error on the line https://github.com/ecodina/python_as3935/blob/master/as3935/AS3935.py#L144
It is:
self.write_byte(0x01, (self.read_byte(0x01) & 0x11110000) | value)Should be:
self.write_byte(0x01, (self.read_byte(0x01) & 0b11110000) | value)The error causes reset of NF_LEV to 0, when you use set_watchdog_threshold().