pull/2/head
ouki-wang 6 years ago
parent d71321f763
commit fe7f222abb
  1. 12
      DFRobot_AS3935_I2C.cpp

@ -109,7 +109,7 @@ void DFRobot_AS3935_I2C::setIRQOutputSource(uint8_t irqSelect)
// only one should be set at once, I think
// 0 = NONE, 1 = TRCO, 2 = SRCO, 3 = LCO
if(1 == irqSelect)
if(1 == irqSelect)
{
singRegWrite(0x08, 0xE0, 0x20); // set only TRCO bit
}
@ -191,19 +191,15 @@ uint8_t DFRobot_AS3935_I2C::setMinStrikes(uint8_t minStrk)
{
singRegWrite(0x02, 0x30, 0x00);
return 1;
}
else if(9 > minStrk)
}else if(9 > minStrk)
{
singRegWrite(0x02, 0x30, 0x10);
return 5;
}
else if(16 > minStrk)
}else if(16 > minStrk)
{
singRegWrite(0x02, 0x30, 0x20);
return 9;
}
else
{
}else{
singRegWrite(0x02, 0x30, 0x30);
return 16;
}

Loading…
Cancel
Save