Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications for 64-bit OS #218

Merged
merged 4 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples_RPi/helloworld_rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions examples_RPi/helloworld_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions examples_RPi/rx-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading