mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 00:36:08 +02:00
sensor_lis2dw: Fix fifo_empty check on lis2dw chips
Fix inverted check for fifo empty. The fifo is empty when the number of entries in the fifo is zero. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -141,7 +141,7 @@ lis2dw_query(struct lis2dw *ax, uint8_t oid)
|
||||
if (ax->model == LIS3DH)
|
||||
fifo_empty = fifo[1] & 0x20;
|
||||
else
|
||||
fifo_empty = fifo[1] & 0x3F;
|
||||
fifo_empty = ((fifo[1] & 0x3F) == 0);
|
||||
|
||||
fifo_ovrn = fifo[1] & 0x40;
|
||||
|
||||
@@ -167,7 +167,7 @@ lis2dw_query(struct lis2dw *ax, uint8_t oid)
|
||||
if (ax->model == LIS3DH)
|
||||
fifo_empty = fifo[0] & 0x20;
|
||||
else
|
||||
fifo_empty = fifo[0] & 0x3F;
|
||||
fifo_empty = ((fifo[0] & 0x3F) == 0);
|
||||
|
||||
fifo_ovrn = fifo[0] & 0x40;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user