   _frameIndex = 0;
   _frameCount = kActions[_actionIndex].frames.size();
   _lastFrameMillis = millis();
-  
+   
   serialPrintfln("starting animation %s (%d frames)", kActions[_actionIndex].name, kActions[_actionIndex].frames.size());
 }
 

int _frameIndex = 0;
int _frameCount = 1;
int _lastFrameMillis = 0;

void setup()
{
  Serial.begin(115200);

    advanceFrame(_actionIndex == _idleAction);
  }

  auto& frame = kActions[_actionIndex].frames[_frameIndex];

  for (int servoIndex = 0; servoIndex < kServoSpecs.size(); servoIndex++)
  {
    auto& servoConfig = kServoSpecs[servoIndex];
    auto& spec = servoConfig.spec;
    float angle = frame.boneAngles[servoIndex] + servoConfig.center;
    angle = servoConfig.flip ? (180 - angle) : angle;
    int pulseLen = (angle / 180) * (spec.pulseMax - spec.pulseMin) + spec.pulseMin;
    _servoMux.setPWM(servoIndex, 0, pulseLen);
  }

