LEGACY: older hexapod sketches (Hexapod_NEW, HexapodRobot)
From https://mangavalk.com/Hexapod/Hexapod @ 7945005 (its Hexapod_Teensy is identical to the copy already in LEGACY). Earlier electronics generation: on-board IK driving an external SSC-32-style servo controller. Notes on what still applies are in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ff85c4eb8
commit
09f7424714
11 files changed
+1318
-1
No files matched your search
@@ -0,0 +1,66 @@
|
||||
// Version 1
|
||||
|
||||
#ifndef Servo_H
|
||||
#define Servo_H
|
||||
|
||||
class Vector
|
||||
{
|
||||
public:
|
||||
float x, y, z;
|
||||
Vector(float X, float Y, float Z)
|
||||
{
|
||||
x = X;
|
||||
y = Y;
|
||||
z = Z;
|
||||
}
|
||||
void Init(float X, float Y, float Z)
|
||||
{
|
||||
x = X;
|
||||
y = Y;
|
||||
z = Z;
|
||||
}
|
||||
Vector()
|
||||
{
|
||||
|
||||
}
|
||||
Vector Lerp(Vector start, Vector end, float percent)
|
||||
{
|
||||
Vector _new = (start + ((end - start) * percent));
|
||||
x = _new.x;
|
||||
y = _new.y;
|
||||
z = _new.z;
|
||||
return _new;
|
||||
}
|
||||
Vector operator + (const Vector other)
|
||||
{
|
||||
Vector _new = Vector();
|
||||
_new.x = x + other.x;
|
||||
_new.y = y + other.y;
|
||||
_new.z = z + other.z;
|
||||
|
||||
return _new;
|
||||
}
|
||||
Vector operator - (const Vector other)
|
||||
{
|
||||
Vector _new = Vector();
|
||||
_new.x = x - other.x;
|
||||
_new.y = y - other.y;
|
||||
_new.z = z - other.z;
|
||||
|
||||
return _new;
|
||||
}
|
||||
Vector operator * (const float other)
|
||||
{
|
||||
Vector _new = Vector(x * other, y * other, z * other);
|
||||
|
||||
return _new;
|
||||
}
|
||||
String Print()
|
||||
{
|
||||
return String(x) + " " + String(y) + " " + String(z);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user