Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
ee56f086
Commit
ee56f086
authored
Dec 26, 2020
by
Eric Duminil
Browse files
Pass by reference
parent
2e99fa40
Changes
3
Show whitespace changes
Inline
Side-by-side
lorawan.h
View file @
ee56f086
...
@@ -40,7 +40,7 @@ namespace lorawan {
...
@@ -40,7 +40,7 @@ namespace lorawan {
extern
String
last_transmission
;
extern
String
last_transmission
;
void
initialize
();
void
initialize
();
void
process
();
void
process
();
void
preparePayloadIfTimeHasCome
(
int16_t
co2
,
float
temp
,
float
hum
);
void
preparePayloadIfTimeHasCome
(
const
int16_t
&
co2
,
const
float
&
temp
,
const
float
&
hum
);
}
}
#endif
#endif
...
...
mqtt.cpp
View file @
ee56f086
...
@@ -207,7 +207,7 @@ namespace mqtt {
...
@@ -207,7 +207,7 @@ namespace mqtt {
}
}
}
}
void
publishIfTimeHasCome
(
const
String
&
timeStamp
,
int16_t
co2
,
float
temp
,
float
hum
)
{
void
publishIfTimeHasCome
(
const
String
&
timeStamp
,
const
int16_t
&
co2
,
const
float
&
temp
,
const
float
&
hum
)
{
// Send message via MQTT according to sending interval
// Send message via MQTT according to sending interval
unsigned
long
now
=
seconds
();
unsigned
long
now
=
seconds
();
//TODO: Send average since last MQTT message?
//TODO: Send average since last MQTT message?
...
...
mqtt.h
View file @
ee56f086
...
@@ -15,6 +15,6 @@ namespace mqtt {
...
@@ -15,6 +15,6 @@ namespace mqtt {
extern
String
last_successful_publish
;
extern
String
last_successful_publish
;
void
initialize
(
String
&
topic
);
void
initialize
(
String
&
topic
);
void
keepConnection
();
void
keepConnection
();
void
publishIfTimeHasCome
(
const
String
&
timeStamp
,
int16_t
co2
,
float
temp
,
float
hum
);
void
publishIfTimeHasCome
(
const
String
&
timeStamp
,
const
int16_t
&
co2
,
const
float
&
temp
,
const
float
&
hum
);
}
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment