Moved things to a FreeRTOS task so that we can garunte that we are meeting timings
This commit is contained in:
+13
-5
@@ -1,36 +1,44 @@
|
||||
// Nathan Hinton
|
||||
// Main file for the hub node. Starting with the WIFI initialization.
|
||||
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "services/service_manager.h"
|
||||
|
||||
#include "services/wifi_service.h"
|
||||
#include "services/web_service.h"
|
||||
#include "services/ota_service.h"
|
||||
#include "services/web_service.h"
|
||||
|
||||
#include "tasks/system_task.h"
|
||||
|
||||
|
||||
ServiceManager services;
|
||||
|
||||
|
||||
WiFiService wifi;
|
||||
WebService web;
|
||||
OTAService ota;
|
||||
WebService web;
|
||||
|
||||
|
||||
SystemTask systemTask(services);
|
||||
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
|
||||
|
||||
services.add(&wifi);
|
||||
services.add(&ota);
|
||||
services.add(&web);
|
||||
|
||||
services.begin();
|
||||
|
||||
systemTask.start();
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
services.update();
|
||||
// Nothing here.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user