Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed Jan 30, 2025
1 parent 37af236 commit 1fb06ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/src/doodlebot/LineFollowing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ export function followLine(previousLine: Point[], pixels: Point[], previousPixel
}

// TODO: change to .005
const x1 = findPointAtDistanceWithIncrements(spline, 0.001, distance - .03);
const x1 = findPointAtDistanceWithIncrements(spline, 0.001, distance - .02);
const x2 = findPointAtDistanceWithIncrements(spline, 0.001, distance);
const point1 = { x: spline.at(x1), y: x1 }
const point2 = { x: spline.at(x2), y: x2 }
Expand Down Expand Up @@ -779,6 +779,7 @@ export function followLine(previousLine: Point[], pixels: Point[], previousPixel
if (errorMultiplier == 0) {
command.angle = Math.max(command.angle * 1.5, 5);
command.radius = Math.min(1.5, command.radius / 2);
command.distance = 0;
}
motorCommands.push(command);

Expand Down

0 comments on commit 1fb06ed

Please sign in to comment.