Skip to content

Commit 8558af6

Browse files
committed
Fixes bug in datTrigger
1 parent d03837b commit 8558af6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/Ex2_Interrupts/Ex2_Interrupts.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ void loop() {
4242
if( digitalRead(dataReadyPin) == HIGH ){ // Wait for new data to be ready.
4343

4444
myData = kxAccel.getAccelData();
45-
digitalWrite(dataReadyPin, HIGH);
4645
Serial.print("X: ");
4746
Serial.print(myData.xData, 4);
4847
Serial.print("g ");

src/SparkFun_Qwiic_KX13X.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ bool QwiicKX13xCore::dataTrigger(){
261261
if( returnError == KX13X_SUCCESS ){
262262
if( tempRegVal & 0x10 )
263263
return true;
264+
else
265+
return false;
264266
}
265267
else
266268
return false;
@@ -539,7 +541,6 @@ KX13X_STATUS_t QwiicKX13xCore::writeRegister(uint8_t reg, uint8_t mask, uint8_t
539541
return KX13X_I2C_ERROR;
540542
tempRegVal &= mask;
541543
tempRegVal |= (data << bitPos);
542-
Serial.println(tempRegVal, HEX);
543544

544545
if( _i2cPort == NULL ) {
545546

0 commit comments

Comments
 (0)