Commit feecc766 authored by user2684's avatar user2684
Browse files

Send a heartbeat when waking up from a wait cycle #50

parent 8a48cf76
...@@ -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.println(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
......
...@@ -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
......
...@@ -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();
......
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