From 0653fc2e3d13d8084b12a72ea48cb28edeea2c75 Mon Sep 17 00:00:00 2001 From: crosstyan Date: Mon, 4 Aug 2025 11:56:47 +0800 Subject: [PATCH] fix: increase delay duration in reset function and adjust data reading logic --- inc/llcc68.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/llcc68.hpp b/inc/llcc68.hpp index 8804255..9a6bfb7 100644 --- a/inc/llcc68.hpp +++ b/inc/llcc68.hpp @@ -141,9 +141,9 @@ reset() { } gpio::set_mode(RST_PIN, gpio::Mode::OUTPUT); gpio::digital_write(RST_PIN, false); - delay_ms(10); + delay_ms(100); gpio::digital_write(RST_PIN, true); - delay_ms(10); + delay_ms(100); const auto instant = Instant<>{}; constexpr auto INTERVAL = std::chrono::duration{spi::DEFAULT_TIMEOUT_MS}; decltype(standby()) res = ue_t{error_t{error::FAILED}}; @@ -988,7 +988,7 @@ read_data_internal() { * each time the transceiver enters Rx mode. In continuous mode the pointer * is incremented starting from the previous position. */ - const auto [sz, ptr] = std::move(*tuple_); + const auto [sz, ptr] = *tuple_; // the rx pointer would become 0x80 at first, so we need to adapt that behavior const auto r_ptr = ptr - sz < DEFAULT_RX_BUFFER_ADDRESS ? ptr : ptr - sz;