Skip to content

Commit

Permalink
Merge pull request #852 from WildernessLabs/bug/stepper-debug
Browse files Browse the repository at this point in the history
remove logging from stepper
  • Loading branch information
adrianstevens authored Dec 7, 2023
2 parents cb07039 + 129116a commit 1fd2fbb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public Task GoTo(Angle position, AngularVelocity velocity, CancellationToken can
return Task.CompletedTask;
}

Resolver.Log.Info($"Currently at: {Position.Degrees} moving to: {position.Degrees}");

// determine shortest path to destination
double totalDistance;
if (position.Degrees < Position.Degrees)
Expand Down Expand Up @@ -104,8 +102,6 @@ public Task GoTo(Angle position, AngularVelocity velocity, CancellationToken can
}
}

Resolver.Log.Info($"Distance to move: {totalDistance} degrees");

return Rotate(new Angle(totalDistance, Angle.UnitType.Degrees), shortestDirection, velocity, cancellationToken);
}

Expand All @@ -127,8 +123,6 @@ public Task GoTo(Angle position, RotationDirection direction, AngularVelocity ve
// convert velocity into frequency based on drive parameters
var freq = GetFrequencyForVelocity(velocity);

Resolver.Log.Info($"Currently at: {start} moving to: {dest}");

double totalDistance;

if (dest < start)
Expand All @@ -148,8 +142,6 @@ public Task GoTo(Angle position, RotationDirection direction, AngularVelocity ve
};
}

Resolver.Log.Info($"Distance to move: {totalDistance} degrees");

return Rotate((int)(totalDistance * _stepsPerDegree), direction, freq, cancellationToken);
}

Expand All @@ -160,8 +152,6 @@ public Task Rotate(Angle amountToRotate, RotationDirection direction, AngularVel
var freq = GetFrequencyForVelocity(velocity);
var steps = (int)(amountToRotate.Degrees * _stepsPerDegree);

Resolver.Log.Info($"Rotating {steps} at {freq.Hertz}");

return Rotate(steps, direction, freq, cancellationToken);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace MeadowApp
public class MeadowApp : App<F7FeatherV2>
{
//<!=SNIP=>
private IPositionalMotor stepper;
private IStepperMotor stepper;

private bool UseStepDirConfiguration { get; set; } = true;

Expand Down

0 comments on commit 1fd2fbb

Please sign in to comment.