diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2023-12-17 11:31:58 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-01-19 11:55:15 -0500 |
commit | 5ff555a705b8d3a586f240eb7456b591ee928ac2 (patch) | |
tree | 8c52fd7df2946f6d411ba25ddbc220d9fae01972 /src/sensor_mpu9250.c | |
parent | 3275614b895c409f30cc9520c02990b18abad3c6 (diff) | |
download | kutter-5ff555a705b8d3a586f240eb7456b591ee928ac2.tar.gz kutter-5ff555a705b8d3a586f240eb7456b591ee928ac2.tar.xz kutter-5ff555a705b8d3a586f240eb7456b591ee928ac2.zip |
sensor_mpu9250: No need to send messages when stopping queries
Simplify the mcu code as any messages are ignored by the host anyway.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sensor_mpu9250.c')
-rw-r--r-- | src/sensor_mpu9250.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/sensor_mpu9250.c b/src/sensor_mpu9250.c index c535d097..7792b4d8 100644 --- a/src/sensor_mpu9250.c +++ b/src/sensor_mpu9250.c @@ -192,16 +192,7 @@ mp9250_stop(struct mpu9250 *mp, uint8_t oid) // disable accel FIFO uint8_t msg[2] = { AR_FIFO_EN, SET_DISABLE_FIFO }; - uint32_t end1_time = timer_read_time(); i2c_write(mp->i2c->i2c_config, sizeof(msg), msg); - uint32_t end2_time = timer_read_time(); - - // Report final data - if (mp->data_count > 0) - mp9250_report(mp, oid); - uint16_t bytes_to_read = get_fifo_status(mp); - mp9250_status(mp, oid, end1_time, end2_time, - bytes_to_read / BYTES_PER_FIFO_ENTRY); // Uncomment and rebuilt to check for FIFO overruns when tuning //output("mpu9240 limit_count=%u fifo_max=%u", |