added motorID to motor sync package

master
Jake 2025-11-24 11:11:10 +08:00
parent 6d80ad31e6
commit 193a1f315f
1 changed files with 3 additions and 2 deletions

View File

@ -153,12 +153,12 @@ void setup() {
// PLAY ANIMATION
// anim.loadFromFile("/aa.anim");
anim.loadFromFile("/test.anim");
// currentAnimation = &anim;
// currentAnimation->setActive(true);
// playMode = PLAY_ONCE;
//Serial.println(anim.header.frameCount);
//Serial.println(anim.printCurves());
Serial.println(anim.printCurves());
// Serial.println("Model");
// Serial.println(servos[0]->getModel(10));
// delay(20);
@ -1105,6 +1105,7 @@ void SendMotorPositions() {
std::vector<uint8_t> payload;
for (const Motor& motor : config.motors) {
payload.push_back(motor.motorID);
uint16_t position = motor.position;
payload.push_back(position & 0xFF); // Low byte
payload.push_back(position >> 8); // High byte