From 2284630a8a2ea34fb14d39f705eba7597032b281 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 8 Jan 2025 03:28:43 -0800 Subject: [PATCH] init `failureDetected` --- RF24.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/RF24.cpp b/RF24.cpp index 8c2bb77a..895742b4 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -562,7 +562,13 @@ 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 +576,13 @@ 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(); }