2025-12-13 20:23:28 +01:00
|
|
|
#include "MainLoop.hpp"
|
|
|
|
|
|
|
|
|
|
MainLoop* mainloop = nullptr;
|
|
|
|
|
|
|
|
|
|
void setup() {
|
2025-12-14 18:57:28 +01:00
|
|
|
// Play small init sequence on error LED to let users know that the device is (re-)booting
|
|
|
|
|
pinMode(3, OUTPUT);
|
|
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
|
|
digitalWrite(3, HIGH);
|
|
|
|
|
delay(100);
|
|
|
|
|
digitalWrite(3, LOW);
|
|
|
|
|
delay(100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Init system
|
2025-12-13 20:23:28 +01:00
|
|
|
mainloop = &MainLoop::getInstance();
|
|
|
|
|
mainloop->setup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
|
mainloop->update();
|
|
|
|
|
}
|