From 2df98c8d9c80f24e08eda222f2afbaf5a884507b Mon Sep 17 00:00:00 2001 From: 2bndy5 <2bndy5@gmail.com> Date: Sat, 17 Jul 2021 05:54:38 -0700 Subject: [PATCH] fix warnings about %lu --- CMakeLists.txt | 1 + RF24Network.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b8fbd17..488e8cb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,7 @@ message(STATUS "using RF24 library: ${RF24}") add_library(${LibTargetName} SHARED RF24Network.cpp ) + target_include_directories(${LibTargetName} PUBLIC ${CMAKE_CURRENT_LIST_DIR} ) diff --git a/RF24Network.cpp b/RF24Network.cpp index 53168fa1..6b631b57 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -265,7 +265,7 @@ uint8_t RF24Network::enqueue(RF24NetworkHeader *header) //The header.reserved contains the actual header.type on the last fragment if (result && frame.header.type == NETWORK_LAST_FRAGMENT) { IF_SERIAL_DEBUG_FRAGMENTATION(printf_P(PSTR("%ui: FRG Last fragment received\n"), millis())); - IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Enqueue assembled frame @ %lu\n"), millis(), frame_queue.size())); + IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Enqueue assembled frame @ %ui\n"), millis(), frame_queue.size())); RF24NetworkFrame *f = &(frameFragmentsCache[frame.header.from_node]); @@ -285,7 +285,7 @@ uint8_t RF24Network::enqueue(RF24NetworkHeader *header) //if (frame.header.type <= MAX_USER_DEFINED_HEADER_TYPE) { //This is not a fragmented payload but a whole frame. - IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Enqueue @ %lu\n"), millis(), frame_queue.size())); + IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Enqueue @ %ui\n"), millis(), frame_queue.size())); // Copy the current frame into the frame queue result = frame.header.type == EXTERNAL_DATA_TYPE ? 2 : 1; //Load external payloads into a separate queue on linux @@ -612,7 +612,7 @@ uint16_t RF24Network::read(RF24NetworkHeader &header, void *message, uint16_t ma } #endif // !defined(ARDUINO_ARCH_AVR) memmove(frame_queue, frame_queue + bufsize + 10 + padding, sizeof(frame_queue) - bufsize); - //IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Received %s\n\r"),millis(),header.toString())); + //IF_SERIAL_DEBUG(printf_P(PSTR("%ui: NET Received %s\n\r"), millis(), header.toString())); #endif // !defined(RF24_LINUX) return bufsize;