implement ramp-ups and ramp-downs for motor

This commit is contained in:
Leonetienne
2025-12-07 23:28:04 +01:00
parent 6f468eb880
commit d9f81e7c68
5 changed files with 349 additions and 82 deletions
+17
View File
@@ -1,7 +1,24 @@
#pragma once
#include "OSerialBus.h"
#include "Motor.h"
// Singleton-class, use MainLoop::getInstance() to get the only instance of the runtime
class MainLoop
{
public:
static MainLoop& getInstance();
MainLoop(const MainLoop& other) = delete;
MainLoop(MainLoop&& other) = delete;
~MainLoop() noexcept;
void run();
private:
MainLoop() noexcept;
OSerialBus oSerialBus;
Motor j0;
Motor j1;
Motor j2;
bool isRunning = true;
};