Added control library call in IK mode + camera focus on discover

This commit is contained in:
Leo Qu
2026-02-20 20:50:35 -05:00
parent ece7bb6634
commit 9f85494d82
9 changed files with 131 additions and 123 deletions

View File

@@ -25,10 +25,10 @@ public abstract class ServoMotorModule : ModuleBase
public abstract void InitialSetAngle(float angle);
public void SetAngleAndSendControlLibrary(float angle)
public void SetAngleAndSendControlLibrary(float angle, float minChangeDegrees = 0.1f)
{
SetAngle(angle);
if (Mathf.Abs(currentAngle - lastSentAngle) > 0.1f)
if (Mathf.Abs(currentAngle - lastSentAngle) > minChangeDegrees)
{
SendToControlLibrary(servoType, currentAngle);
lastSentAngle = currentAngle;