Skip to content

Commit 0c5b145

Browse files
author
betzrhodes
authored
Merge pull request #17 from electricimp/develop
fixed typo in configureFifoInterrupt
2 parents 5b7d2b3 + cafa2b1 commit 0c5b145

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: LIS3DH.device.lib.nut

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const LIS3DH_ADC2 = 0x02;
9898
const LIS3DH_ADC3 = 0x03;
9999

100100
class LIS3DH {
101-
static VERSION = "2.0.0";
101+
static VERSION = "2.0.1";
102102

103103
// I2C information
104104
_i2c = null;
@@ -302,15 +302,15 @@ class LIS3DH {
302302
// Enable/disable the FIFO buffer
303303
_setRegBit(LIS3DH_CTRL_REG5, 6, enable ? 1 : 0);
304304

305-
if (state) {
305+
if (enable) {
306306
// Stream-to-FIFO mode, watermark of [28].
307307
_setReg(LIS3DH_FIFO_CTRL_REG, (fifomode & 0xc0) | (watermark & 0x1F));
308308
} else {
309309
_setReg(LIS3DH_FIFO_CTRL_REG, 0x00);
310310
}
311311

312312
// Enable/disable watermark interrupt
313-
_setRegBit(LIS3DH_CTRL_REG3, 2, state ? 1 : 0);
313+
_setRegBit(LIS3DH_CTRL_REG3, 2, enable ? 1 : 0);
314314

315315
}
316316

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This library also supports the LIS2DH12, another widely used three-axis MEMS acc
88

99
The LIS3DH can interface over I²C or SPI. This class addresses only I²C for the time being.
1010

11-
**To add this library to your project, add** `#require "LIS3DH.device.lib.nut:2.0.0"` **to the top of your device code**
11+
**To add this library to your project, add** `#require "LIS3DH.device.lib.nut:2.0.1"` **to the top of your device code**
1212

1313
## Class Usage
1414

0 commit comments

Comments
 (0)