Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SmartHome
NodeManager_GasSensor
Commits
feecc766
Commit
feecc766
authored
Apr 12, 2017
by
user2684
Browse files
Send a heartbeat when waking up from a wait cycle #50
parent
8a48cf76
Changes
3
Hide whitespace changes
Inline
Side-by-side
NodeManager.cpp
View file @
feecc766
...
@@ -441,7 +441,7 @@ void SensorThermistor::onLoop() {
...
@@ -441,7 +441,7 @@ void SensorThermistor::onLoop() {
Serial
.
print
(
F
(
" V="
));
Serial
.
print
(
F
(
" V="
));
Serial
.
print
(
adc
);
Serial
.
print
(
adc
);
Serial
.
print
(
F
(
" T="
));
Serial
.
print
(
F
(
" T="
));
Serial
.
print
ln
(
temperature
);
Serial
.
print
(
temperature
);
Serial
.
print
(
F
(
" M="
));
Serial
.
print
(
F
(
" M="
));
Serial
.
println
(
getControllerConfig
().
isMetric
);
Serial
.
println
(
getControllerConfig
().
isMetric
);
#endif
#endif
...
@@ -1891,6 +1891,8 @@ void NodeManager::_sleep() {
...
@@ -1891,6 +1891,8 @@ void NodeManager::_sleep() {
if
(
_sleep_mode
==
WAIT
)
{
if
(
_sleep_mode
==
WAIT
)
{
// wait for the given interval
// wait for the given interval
wait
(
sleep_ms
);
wait
(
sleep_ms
);
// send heartbeat to the controller
sendHeartbeat
();
}
}
else
if
(
_sleep_mode
==
SLEEP
)
{
else
if
(
_sleep_mode
==
SLEEP
)
{
// setup interrupt pins
// setup interrupt pins
...
...
NodeManager.h
View file @
feecc766
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include
<Arduino.h>
#include
<Arduino.h>
// define NodeManager version
// define NodeManager version
#define VERSION "1.
4
"
#define VERSION "1.
5-dev1
"
/***********************************
/***********************************
Constants
Constants
...
...
NodeManager.ino
View file @
feecc766
...
@@ -41,7 +41,7 @@ void before() {
...
@@ -41,7 +41,7 @@ void before() {
// presentation
// presentation
void
presentation
()
{
void
presentation
()
{
// Send the sketch version information to the gateway and Controller
// Send the sketch version information to the gateway and Controller
sendSketchInfo
(
SKETCH_NAME
,
SKETCH_VERSION
);
sendSketchInfo
(
SKETCH_NAME
,
SKETCH_VERSION
);
// call NodeManager presentation routine
// call NodeManager presentation routine
nodeManager
.
presentation
();
nodeManager
.
presentation
();
...
...
Write
Preview
Supports
Markdown
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