From ce9bbb80bac81a991e3bd73d46e41c006af843b2 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 10 Jan 2025 03:10:59 -0800 Subject: [PATCH] init `failureDetected` (#1016) --- RF24.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/RF24.cpp b/RF24.cpp index 8c2bb77a..0aeeea65 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -562,7 +562,18 @@ uint8_t RF24::sprintf_address_register(char* out_buffer, uint8_t reg, uint8_t qt /****************************************************************************/ RF24::RF24(rf24_gpio_pin_t _cepin, rf24_gpio_pin_t _cspin, uint32_t _spi_speed) - : ce_pin(_cepin), csn_pin(_cspin), spi_speed(_spi_speed), payload_size(32), _is_p_variant(false), _is_p0_rx(false), addr_width(5), dynamic_payloads_enabled(true), csDelay(5) + : ce_pin(_cepin), + csn_pin(_cspin), + spi_speed(_spi_speed), + payload_size(32), + _is_p_variant(false), + _is_p0_rx(false), + addr_width(5), + dynamic_payloads_enabled(true), +#if defined FAILURE_HANDLING + failureDetected(0), +#endif + csDelay(5) { _init_obj(); } @@ -570,7 +581,18 @@ RF24::RF24(rf24_gpio_pin_t _cepin, rf24_gpio_pin_t _cspin, uint32_t _spi_speed) /****************************************************************************/ RF24::RF24(uint32_t _spi_speed) - : ce_pin(RF24_PIN_INVALID), csn_pin(RF24_PIN_INVALID), spi_speed(_spi_speed), payload_size(32), _is_p_variant(false), _is_p0_rx(false), addr_width(5), dynamic_payloads_enabled(true), csDelay(5) + : ce_pin(RF24_PIN_INVALID), + csn_pin(RF24_PIN_INVALID), + spi_speed(_spi_speed), + payload_size(32), + _is_p_variant(false), + _is_p0_rx(false), + addr_width(5), + dynamic_payloads_enabled(true), +#if defined FAILURE_HANDLING + failureDetected(0), +#endif + csDelay(5) { _init_obj(); }