diff --git a/examples_RPi/helloworld_rx.cpp b/examples_RPi/helloworld_rx.cpp index 520338af..2f933d7e 100644 --- a/examples_RPi/helloworld_rx.cpp +++ b/examples_RPi/helloworld_rx.cpp @@ -29,8 +29,8 @@ const uint16_t other_node = 01; struct payload_t { // Structure of our payload - unsigned long ms; - unsigned long counter; + uint32_t ms; + uint32_t counter; }; int main(int argc, char** argv) @@ -56,7 +56,7 @@ int main(int argc, char** argv) payload_t payload; network.read(header, &payload, sizeof(payload)); - printf("Received payload: counter=%lu, origin timestamp=%lu\n", payload.counter, payload.ms); + printf("Received payload: counter=%u, origin timestamp=%u\n", payload.counter, payload.ms); } //sleep(2); delay(2000); diff --git a/examples_RPi/helloworld_tx.cpp b/examples_RPi/helloworld_tx.cpp index 1e5fe779..6352133a 100644 --- a/examples_RPi/helloworld_tx.cpp +++ b/examples_RPi/helloworld_tx.cpp @@ -32,13 +32,13 @@ const uint16_t other_node = 00; // How often (in milliseconds) to send a message to the `other_node` const unsigned long interval = 2000; -unsigned long last_sent; // When did we last send? -unsigned long packets_sent; // How many have we sent already +uint32_t last_sent; // When did we last send? +uint32_t packets_sent; // How many have we sent already struct payload_t { // Structure of our payload - unsigned long ms; - unsigned long counter; + uint32_t ms; + uint32_t counter; }; int main(int argc, char** argv) @@ -58,7 +58,7 @@ int main(int argc, char** argv) while (1) { network.update(); - unsigned long now = millis(); // If it's time to send a message, send it! + uint32_t now = millis(); // If it's time to send a message, send it! if (now - last_sent >= interval) { last_sent = now; diff --git a/examples_RPi/rx-test.cpp b/examples_RPi/rx-test.cpp index df4372bb..6e188a85 100644 --- a/examples_RPi/rx-test.cpp +++ b/examples_RPi/rx-test.cpp @@ -27,17 +27,17 @@ const uint16_t other_node = 01; struct payload_power_t { // Structure of our payload - unsigned long nodeId; + uint32_t nodeId; float power; float current; }; struct payload_weather_t { - unsigned long nodeId; + uint32_t nodeId; float temperature; float humidity; - unsigned long lux; + uint32_t lux; }; int main(int argc, char** argv)