lsm6ds: add temporary status diagnostics
This commit is contained in:
1 parent
3b86faa445
commit
e2d4b947e4
1 file changed
+5
@@ -101,6 +101,11 @@ void LSM6DSComponent::update() {
|
||||
if (!this->read_register(0x1E, &status, 1))
|
||||
return;
|
||||
|
||||
ESP_LOGD(TAG, "STATUS=0x%02X accel_odr=0x%02X gyro_odr=0x%02X",
|
||||
status,
|
||||
static_cast<uint8_t>(this->accel_odr_),
|
||||
static_cast<uint8_t>(this->gyro_odr_));
|
||||
|
||||
if (this->gyro_odr_ != LSM6DS_ODR_OFF && (status & 0x01)) { // GDA - Gyroscope data available
|
||||
uint8_t data[6];
|
||||
if (this->read_register(0x22, data, 6)) {
|
||||
|
||||
Reference in new issue
Block a user