Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions OpenFFBClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ static void Main(string[] args)
Console.WriteLine("Inverted: {0}", openFFBoard.Axis.GetInvert());
Console.WriteLine("Idle spring: {0}", openFFBoard.Axis.GetIdlespring());
Console.WriteLine("Damper: {0}", openFFBoard.Axis.GetAxisdamper());
Console.WriteLine("Friction: {0}", openFFBoard.Axis.GetAxisfriction());
Console.WriteLine("Inertia: {0}", openFFBoard.Axis.GetAxisinertia());
Console.WriteLine("Encoder type: {0}", openFFBoard.Axis.GetEnctype());
Console.WriteLine("Driver type: {0}", openFFBoard.Axis.GetDrvtype());
Console.WriteLine("Encoder position: {0}", openFFBoard.Axis.GetPos());
Expand Down
53 changes: 50 additions & 3 deletions OpenFFBSharp/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,56 @@ public long GetCurpos()
{
return _curpos.GetValue(_board, this);
}
#endregion
}
public class CANAnalogAxes : BoardClass
#endregion

#region axisfriction
private readonly BoardCommand<long> _axisfriction = new BoardCommand<long>("axisfriction", 0x16, "Axis Friction. Independent friction effect. 255=100%", CmdTypes.Get | CmdTypes.Set);

/// <summary>
/// Axis Friction configured position
/// </summary>
/// <returns></returns>
public long GetAxisfriction()
{
return _axisfriction.GetValue(_board, this);
}

/// <summary>
/// Axios Friction. Independent friction effect. 255=100%
/// </summary>
/// <returns></returns>
public bool SetAxisfriction(byte newAxisfriction)
{
var query = _axisfriction.SetValue(_board, this, newAxisfriction);
return query.Type == CmdType.Acknowledgment && query.ClassId == ClassId && query.Cmd == _axisfriction;
}
#endregion

#region axisinertia
private readonly BoardCommand<long> _axisinertia = new BoardCommand<long>("axisinertia", 0xF, "Axis Inertia. Independent inertia effect. 255=100%", CmdTypes.Get | CmdTypes.Set);

/// <summary>
/// Axis Inertia configured position
/// </summary>
/// <returns></returns>
public long GetAxisinertia()
{
return _axisinertia.GetValue(_board, this);
}

/// <summary>
/// Axis Inertia. Independent inertia effect. 255=100%
/// </summary>
/// <returns></returns>
public bool SetAxisinertia(byte newAxisinertia)
{
var query = _axisinertia.SetValue(_board, this, newAxisinertia);
return query.Type == CmdType.Acknowledgment && query.ClassId == ClassId && query.Cmd == _axisinertia;
}
#endregion
}

public class CANAnalogAxes : BoardClass
{

private readonly Board _board;
Expand Down
1 change: 1 addition & 0 deletions OpenFFBSharp/Serial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public override void Connect()
public override void Disconnect()
{
_serialPort.Close();
IsConnected = _serialPort.IsOpen;
}

public static string[] GetBoards()
Expand Down
Loading