Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
namespace RobotNet10.NavigationTune.Execution;
|
||||
|
||||
/// <summary>
|
||||
/// Adapter to wrap ILocalization from RobotApp
|
||||
/// This will be implemented in the application layer that has access to RobotApp
|
||||
/// </summary>
|
||||
public class LocalizationAdapter(Func<double> getX, Func<double> getY, Func<double> getTheta) : ILocalizationProvider
|
||||
{
|
||||
private readonly Func<double> _getX = getX;
|
||||
private readonly Func<double> _getY = getY;
|
||||
private readonly Func<double> _getTheta = getTheta;
|
||||
|
||||
public double X => _getX();
|
||||
public double Y => _getY();
|
||||
public double Theta => _getTheta(); // radians
|
||||
}
|
||||
Reference in New Issue
Block a user