Commit 3923e608 authored by Eric Duminil's avatar Eric Duminil
Browse files

Pass by reference

parent ee56f086
...@@ -183,7 +183,7 @@ namespace lorawan { ...@@ -183,7 +183,7 @@ namespace lorawan {
} }
} }
void preparePayloadIfTimeHasCome(int16_t co2, float temperature, float humidity) { void preparePayloadIfTimeHasCome(const int16_t &co2, const float &temperature, const float &humidity) {
static unsigned long last_sent_at = 0; static unsigned long last_sent_at = 0;
unsigned long now = seconds(); unsigned long now = seconds();
if (now - last_sent_at > config::lorawan_sending_interval) { if (now - last_sent_at > config::lorawan_sending_interval) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment