Skip to content

Commit

Permalink
Merge branch 'master' into CMake-4-Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 authored Nov 14, 2021
2 parents a33695b + b6c6f1c commit b3915b2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion RF24Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,12 @@ uint16_t RF24Mesh::renewAddress(uint32_t timeout)
while (!requestAddress(reqCounter)) {
if (millis() - start > timeout) { return 0; }

delay(50 + ((totalReqs + 1) * (reqCounter + 1)) * 2);
uint32_t timeoutInternal = 50 + ((totalReqs + 1) * (reqCounter + 1)) * 2;
uint32_t startInternal = millis();
while (millis() - startInternal < timeoutInternal) {
MESH_CALLBACK
delay(1);
}
reqCounter++;
reqCounter = reqCounter % 4;
totalReqs++;
Expand Down
2 changes: 1 addition & 1 deletion examples_RPi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ all: ${PROGRAMS}

${PROGRAMS}: ${SOURCES}
mkdir -p bin
$(CC) ${CCFLAGS} -Wall -I../ -lrf24-bcm -lrf24network -lrf24mesh $@.cpp -o bin/$@
$(CC) ${CCFLAGS} -Wall -I../ $@.cpp -lrf24-bcm -lrf24network -lrf24mesh -o bin/$@

clean:
rm -rf $(PROGRAMS)
Expand Down
2 changes: 1 addition & 1 deletion examples_RPi/ncurses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ all: ${PROGRAMS}

${PROGRAMS}: ${SOURCES}
mkdir -p bin
$(CC) ${CCFLAGS} -Wall -I../ -lncurses -lrf24-bcm -lrf24network -lrf24mesh $@.cpp -o bin/$@
$(CC) ${CCFLAGS} -Wall -I../ $@.cpp -lncurses -lrf24-bcm -lrf24network -lrf24mesh -o bin/$@

clean:
rm -rf $(PROGRAMS)
Expand Down
1 change: 1 addition & 0 deletions examples_RPi/ncurses/RF24Mesh_Ncurses_Master.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <RF24Network/RF24Network.h>

RF24 radio(22, 0);

RF24Network network(radio);
RF24Mesh mesh(radio, network);

Expand Down
2 changes: 1 addition & 1 deletion pyRF24Mesh/pyRF24Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ BOOST_PYTHON_MODULE(RF24Mesh)
//void setStaticAddress(uint8_t nodeID, uint16_t address);
.def("setStaticAddress", &RF24Mesh::setStaticAddress, (bp::arg("nodeID"), bp::arg("address")));
}
}
}

0 comments on commit b3915b2

Please sign in to comment.