Threading/Queues and Display Gif added

This commit is contained in:
2026-10-25 00:05:24 +02:00
parent 893dfd419e
commit 70f77133e6
11 changed files with 244 additions and 110 deletions
+3 -8
View File
@@ -5,13 +5,14 @@
#include "Protocol.h"
struct MotionFrame { int leg[6][3]; };
struct MotionConfig { int minPulse; int maxPulse; int intervalMs; };
class MotionController {
public:
MotionController();
void begin();
void update(); // The 5ms interpolation "heartbeat"
bool pushFrame(int leg[6][3]);
void update();
void setTarget(const MotionFrame& frame);
void setConfigs(int minP, int maxP, int interval);
private:
@@ -26,16 +27,10 @@ private:
float currentLegF[6][3];
float stepSize[6][3];
// Circular Buffer
MotionFrame buffer[10];
int head = 0;
int tail = 0;
// Configs
int _servoMin = 125;
int _servoMax = 625;
int _pythonInterval = 50;
unsigned long lastUpdate = 0;
};
#endif