From 2a328615ede3bc952a906bf8c885eb33a17df6c5 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 18 Apr 2024 18:12:35 -0400 Subject: [PATCH] drivers/optical_flow/paw3902: fix RegisterRead udelay --- src/drivers/optical_flow/paw3902/PAW3902.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/optical_flow/paw3902/PAW3902.cpp b/src/drivers/optical_flow/paw3902/PAW3902.cpp index 05a8092a3d75..af70f9a5e32a 100644 --- a/src/drivers/optical_flow/paw3902/PAW3902.cpp +++ b/src/drivers/optical_flow/paw3902/PAW3902.cpp @@ -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 @@ -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); }