Files
audio_project_hub/src/main.cpp
T
2026-08-09 14:32:09 -06:00

52 lines
964 B
C++

// Nathan Hinton
// Main file for the hub node. Starting with the WIFI initialization.
#include <Arduino.h>
#include "core/dashboard_state.h"
#include "core/diagnostics_state.h"
#include "services/service_manager.h"
#include "services/wifi_service.h"
#include "services/ota_service.h"
#include "services/web_service.h"
#include "tasks/system_task.h"
#include "tasks/diagnostics_task.h"
DashboardState dashboardState;
DiagnosticsState diagnosticsState;
// Simple service scheduler nice for grouping tasks
ServiceManager services;
WiFiService wifi;
OTAService ota;
WebService web(dashboardState, diagnosticsState);
// Actual FreeRTOS tasks that are scheduled
SystemTask systemTask(services);
DiagnosticsTask diagnosticsTask(diagnosticsState);
void setup()
{
Serial.begin(115200);
services.add(&wifi);
services.add(&ota);
services.add(&web);
systemTask.start();
diagnosticsTask.start();
}
void loop()
{
// Nothing here.
}