From 8ad8589cf537cb0526f36cb7e4970c8e8fa7e467 Mon Sep 17 00:00:00 2001 From: Jake Date: Sun, 2 Nov 2025 17:49:18 +0800 Subject: [PATCH] animation length now is correctly variable --- HansonServo.ino | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/HansonServo.ino b/HansonServo.ino index 9f2fe0f..e697f7a 100644 --- a/HansonServo.ino +++ b/HansonServo.ino @@ -153,10 +153,12 @@ void setup() { // PLAY ANIMATION - // anim.loadFromFile("/asdf.anim"); - // currentAnimation = &anim; - // currentAnimation->setActive(true); - // playMode = PLAY_ONCE; + anim.loadFromFile("/aa.anim"); + currentAnimation = &anim; + currentAnimation->setActive(true); + playMode = PLAY_ONCE; + //Serial.println(anim.header.frameCount); + //Serial.println(anim.printCurves()); } void SetID(uint8_t oldID, uint8_t newID) { @@ -681,7 +683,7 @@ bool parseAnimationPayload(const uint8_t* payload, uint16_t length, Animation& a } animation.header.frameCount = ptr[5] << 8 | ptr[4]; // little-endian ✅ - + sendMessage(String(animation.header.frameCount)); animation.header.version = ptr[6]; animation.header.frameRate = ptr[7]; memcpy(animation.header.reserved, ptr + 8, 8);