Skip to content

Commit

Permalink
drivers/optical_flow/paw3902: fix RegisterRead udelay
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Apr 19, 2024
1 parent ec3ceae commit 2a32861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/optical_flow/paw3902/PAW3902.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2019-2023 PX4 Development Team. All rights reserved.
* Copyright (c) 2019-2024 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -918,7 +918,7 @@ uint8_t PAW3902::RegisterRead(uint8_t reg)
// tSRW/tSRR SPI Time Between Read And Subsequent Commands
const hrt_abstime elapsed_last_read = hrt_elapsed_time(&_last_read_time);

if (elapsed_last_write < TIME_TSRW_TSRR_us) {
if (elapsed_last_read < TIME_TSRW_TSRR_us) {
px4_udelay(TIME_TSRW_TSRR_us - elapsed_last_read);
}

Expand Down

0 comments on commit 2a32861

Please sign in to comment.