diff --git a/script.js b/script.js index 650568d..d57375e 100644 --- a/script.js +++ b/script.js @@ -285,15 +285,12 @@ function drawRobot(ctx, robot) { modules.forEach(module => drawModule(ctx, module)); } -let robot = new SwerveDrive(PresetConfigs.eightWheel(200)); -let xSpeed = -100; -let xDir = 1; - -let ySpeed = -100; -let yDir = 0.8; +// Initialize Variables +const robot = new SwerveDrive(PresetConfigs.eightWheel(200)); +let xSpeed = 0; +let ySpeed = 0; let turnSpeed = -1; -let turnDir = 0.01; let robotRotation = 0; // Track cumulative robot rotation for grid display let gridSquareSize = 25;