Skip to content

Commit

Permalink
fix warnings about %lu
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 17, 2021
1 parent 95b5e09 commit 2df98c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down
6 changes: 3 additions & 3 deletions RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2df98c8

Please sign in to comment.