Skip to content
Snippets Groups Projects
Commit e9bcd8ed authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

DEBUG: Add printout about current free memory

parent 8dc5c706
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#include "NodeManager.h" #include "NodeManager.h"
void printFM() {
Serial.print (F("Free memory = "));
Serial.println (freeMemory ());
}
/*************************************** /***************************************
PowerManager PowerManager
*/ */
...@@ -3503,6 +3507,7 @@ void NodeManager::presentation() { ...@@ -3503,6 +3507,7 @@ void NodeManager::presentation() {
// setup NodeManager // setup NodeManager
void NodeManager::setup() { void NodeManager::setup() {
Serial.print(F("NodeManager::setup: ")); printFM();
// retrieve and store isMetric from the controller // retrieve and store isMetric from the controller
if (_get_controller_config) _is_metric = getControllerConfig().isMetric; if (_get_controller_config) _is_metric = getControllerConfig().isMetric;
#if DEBUG == 1 #if DEBUG == 1
...@@ -3517,9 +3522,11 @@ void NodeManager::setup() { ...@@ -3517,9 +3522,11 @@ void NodeManager::setup() {
// run setup for all the registered sensors // run setup for all the registered sensors
for (int i = 1; i <= MAX_SENSORS; i++) { for (int i = 1; i <= MAX_SENSORS; i++) {
if (_sensors[i] == 0) continue; if (_sensors[i] == 0) continue;
Serial.print(F("NodeManager::setup: Before sensor "));Serial.print(i);printFM();
// call each sensor's setup() // call each sensor's setup()
_sensors[i]->setup(); _sensors[i]->setup();
} }
Serial.print(F("NodeManager::setup: END"));printFM();
} }
// run the main function for all the register sensors // run the main function for all the register sensors
......
...@@ -5,10 +5,13 @@ ...@@ -5,10 +5,13 @@
#define NodeManager_h #define NodeManager_h
#include <Arduino.h> #include <Arduino.h>
#include "MemoryFree.h"
// define NodeManager version // define NodeManager version
#define VERSION "1.7-dev" #define VERSION "1.7-dev"
void printFM();
/*********************************** /***********************************
Constants Constants
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment