Commit e9bcd8ed authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

DEBUG: Add printout about current free memory

parent 8dc5c706
......@@ -4,6 +4,10 @@
#include "NodeManager.h"
void printFM() {
Serial.print (F("Free memory = "));
Serial.println (freeMemory ());
}
/***************************************
PowerManager
*/
......@@ -3503,6 +3507,7 @@ void NodeManager::presentation() {
// setup NodeManager
void NodeManager::setup() {
Serial.print(F("NodeManager::setup: ")); printFM();
// retrieve and store isMetric from the controller
if (_get_controller_config) _is_metric = getControllerConfig().isMetric;
#if DEBUG == 1
......@@ -3517,9 +3522,11 @@ void NodeManager::setup() {
// run setup for all the registered sensors
for (int i = 1; i <= MAX_SENSORS; i++) {
if (_sensors[i] == 0) continue;
Serial.print(F("NodeManager::setup: Before sensor "));Serial.print(i);printFM();
// call each sensor's setup()
_sensors[i]->setup();
}
Serial.print(F("NodeManager::setup: END"));printFM();
}
// run the main function for all the register sensors
......
......@@ -5,10 +5,13 @@
#define NodeManager_h
#include <Arduino.h>
#include "MemoryFree.h"
// define NodeManager version
#define VERSION "1.7-dev"
void printFM();
/***********************************
Constants
*/
......
Markdown is supported
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