2026-09-28 15:36:37 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include "Kinematics.h"
|
|
|
|
|
|
|
|
|
|
class ServoDriver {
|
|
|
|
|
public:
|
2026-10-01 15:53:55 +02:00
|
|
|
void begin(); // set up the PWM pins (no pulses yet)
|
|
|
|
|
void relaxAll(); // stop all pulses - call when disarming
|
2026-09-28 15:36:37 +02:00
|
|
|
void writeLeg(int leg_index, const JointAngles& angles);
|
2026-10-01 15:53:55 +02:00
|
|
|
|
|
|
|
|
// Joint angle -> pulse through that servo's calibration (Config.h SERVOS).
|
|
|
|
|
static int degToMicros(int leg, int joint, float deg);
|
2026-09-28 15:36:37 +02:00
|
|
|
};
|