#pragma once #include #include struct FirmwareVersion { uint8_t major; uint8_t minor; }; struct Motor { String name; // Optional: name or ID of the motor uint8_t motorID; uint16_t position; // Current position in encoder ticks or degrees bool isEnabled = true; }; struct RobotConfig { String deviceName; // Name of the robot FirmwareVersion firmwareVersion; std::vector motors; // Dynamic array of motors uint16_t getMotorPosition(uint8_t motorID) const; bool setMotorPosition(uint8_t motorID, uint16_t newPosition); bool setMotorEnabled(uint8_t motorID,bool enable); bool isMotorEnabled(uint8_t motorID); void enableAllMotors(); String serializeJSON() const; std::vector serializeToBytes() const; };