Moved interfaces and abstracts to external package ln.motion.interfaces
parent
12333b804d
commit
a5b2baf8c2
|
@ -1,25 +0,0 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public abstract class Ax
|
||||
{
|
||||
public virtual float CurrentSpeed { get; }
|
||||
public virtual float CurrentPosition { get; }
|
||||
public virtual AxValues CurrentValues => new AxValues() {Speed = CurrentSpeed, Position = CurrentPosition};
|
||||
|
||||
public virtual float TargetSpeed { get; set; }
|
||||
public virtual float TargetPosition { get; set; }
|
||||
|
||||
public virtual AxValues TargetValues
|
||||
{
|
||||
get => new AxValues() {Speed = TargetSpeed, Position = TargetPosition};
|
||||
set
|
||||
{
|
||||
TargetPosition = value.Position;
|
||||
TargetSpeed = value.Speed;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsEnabled { get; }
|
||||
public virtual bool IsFaulted { get; }
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public struct AxValues
|
||||
{
|
||||
public float Speed;
|
||||
public float Position;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public abstract class DriveController
|
||||
{
|
||||
public abstract void Initialize();
|
||||
|
||||
public abstract bool IsOnline { get; }
|
||||
|
||||
public abstract bool GetAxCurrentValues(out AxValues[] axValuesArray);
|
||||
public abstract bool GetAxTargetValues(out AxValues[] axValuesArray);
|
||||
public abstract bool SetAxTargetValues(AxValues[] axValuesArray);
|
||||
|
||||
public virtual bool SetAxTargetValues(int ax, AxValues axValues)
|
||||
{
|
||||
if (GetAxTargetValues(out AxValues[] axValuesArray))
|
||||
{
|
||||
axValuesArray[ax] = axValues;
|
||||
return SetAxTargetValues(axValuesArray);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace ln.motion
|
||||
{
|
||||
public abstract class Kinematic
|
||||
{
|
||||
public Kinematic()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract bool Direct(AxValues[] axValuesArray, out Matrix4x4 position);
|
||||
public abstract bool Inverse(Matrix4x4 position, AxValues[] axValues);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using ln.motion.interfaces;
|
||||
|
||||
namespace ln.motion
|
||||
{
|
||||
|
|
|
@ -4,4 +4,8 @@
|
|||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ln.motion.interfaces" Version="0.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue