We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36a4c89 commit df2b6b0Copy full SHA for df2b6b0
src/components/i2c/drivers/WipperSnapper_I2C_Driver_LPS28DFW.h
@@ -63,10 +63,16 @@ class WipperSnapper_I2C_Driver_LPS28DFW : public WipperSnapper_I2C_Driver {
63
return false;
64
65
// Set up sample rate and filter initialization
66
- _lps28->setDataRate(LPS28_ODR_ONESHOT);
67
- _lps28->setAveraging(LPS28_AVG_512);
+ if (!_lps28->setDataRate(LPS28_ODR_ONESHOT)) {
+ WS_DEBUG_PRINTLN("Failed to set data rate");
68
+ return false;
69
+ }
70
+ if (!_lps28->setAveraging(LPS28_AVG_512)) {
71
+ WS_DEBUG_PRINTLN("Failed to set averaging");
72
73
74
- return readSensor();
75
+ return true;
76
}
77
78
/*******************************************************************************/
0 commit comments