Spaces:
Running
Running
File size: 1,326 Bytes
6ce4ca6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
// Import all functions from the unified scsServoSDK module
import {
connect,
disconnect,
isConnected,
lockServo,
unlockServo,
lockServos,
unlockServos,
lockServosForProduction,
unlockServosForManualMovement,
readPosition,
syncReadPositions,
writePosition,
writeTorqueEnable,
writePositionUnlocked,
writePositionAndDisableTorque,
writeTorqueEnableUnlocked,
syncWritePositions,
setBaudRate,
setServoId,
setWheelMode,
setPositionMode
} from "./scsServoSDK.mjs";
// Create the unified SCS servo SDK object
export const scsServoSDK = {
// Connection management
connect,
disconnect,
isConnected,
// Servo locking operations
lockServo,
unlockServo,
lockServos,
unlockServos,
lockServosForProduction,
unlockServosForManualMovement,
// Read operations (no locking needed)
readPosition,
syncReadPositions,
// Write operations - LOCKED MODE (respects servo locks)
writePosition,
writeTorqueEnable,
// Write operations - UNLOCKED MODE (temporary unlock for operation)
writePositionUnlocked,
writePositionAndDisableTorque,
writeTorqueEnableUnlocked,
// Sync write operations
syncWritePositions,
// Configuration functions
setBaudRate,
setServoId,
setWheelMode,
setPositionMode
};
// Export debug configuration for easy access
export { DEBUG_ENABLED, debugLog } from "./debug.mjs";
|