improve debug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <Arduino.h>
|
||||
#include "appcontext.hpp"
|
||||
#include "config.h"
|
||||
#include "debugutil.hpp"
|
||||
#include "light.h"
|
||||
#include "mqtt.h"
|
||||
#include "network.h"
|
||||
@@ -41,9 +42,8 @@ Scheduler *scheduler = nullptr;
|
||||
void initializeScheduler();
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(115200);
|
||||
Serial.println("Starting Smart RGB ESP32...");
|
||||
Debug::begin(115200);
|
||||
Debug::println("Starting Smart RGB ESP32...");
|
||||
stateMachine = new StateMachine<maxNumberOfStates>();
|
||||
initializeScheduler();
|
||||
appContext->pinR = pinR;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <Arduino.h>
|
||||
#include "appcontext.hpp"
|
||||
#include "config.h"
|
||||
#include "debugutil.hpp"
|
||||
#include "mqtt.h"
|
||||
#include "pin.h"
|
||||
#include "statemachine.hpp"
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
NetworkInitializeState(AppContext *appContext) : State("NetworkInitializeState", StateId::NetworkInitializeState), appContext(appContext) {}
|
||||
|
||||
void onEnter(StateMachineBase &stateMachine) override {
|
||||
Serial.println("Entering NetworkInitializeState");
|
||||
Debug::println("Entering NetworkInitializeState");
|
||||
if (appContext && !appContext->network) {
|
||||
appContext->network = new Network(hostName, friendlyName);
|
||||
} else if (appContext && appContext->network) {
|
||||
@@ -91,7 +92,7 @@ public:
|
||||
}
|
||||
|
||||
void onExit(StateMachineBase &stateMachine) override {
|
||||
Serial.println("Exiting RunningState");
|
||||
Debug::println("Exiting RunningState");
|
||||
}
|
||||
|
||||
void onUpdate(StateMachineBase &stateMachine) override {
|
||||
|
||||
Reference in New Issue
Block a user