feat(focas): add cnc_getfigure per-axis position-figure client binding
This commit is contained in:
@@ -284,6 +284,18 @@ public sealed class WireFocasClient : IFocasClient
|
||||
public Task<IReadOnlyList<int>> GetSpindleMaxRpmsAsync(CancellationToken cancellationToken) =>
|
||||
ReadSpindleMetricAsync((sel, ct) => _wire.ReadSpindleMaxRpmAsync(sel, ct), cancellationToken);
|
||||
|
||||
/// <summary>Gets the per-axis position decimal-place figures via <c>cnc_getfigure</c>.</summary>
|
||||
/// <param name="cancellationToken">Cancellation token for the operation.</param>
|
||||
/// <returns>
|
||||
/// An empty list — the managed FOCAS/2 Ethernet wire client (<see cref="FocasWireClient"/>)
|
||||
/// does not currently expose the <c>cnc_getfigure</c> command, so this backend reports no
|
||||
/// per-axis figures. Per the <see cref="IFocasClient.GetPositionFiguresAsync"/> contract an
|
||||
/// empty list signals the driver to fall back to the configured <c>PositionDecimalPlaces</c>.
|
||||
/// Never throws — figure reads degrade to the config knob rather than faulting.
|
||||
/// </returns>
|
||||
public Task<IReadOnlyList<int>> GetPositionFiguresAsync(CancellationToken cancellationToken) =>
|
||||
Task.FromResult<IReadOnlyList<int>>(Array.Empty<int>());
|
||||
|
||||
private static async Task<IReadOnlyList<int>> ReadSpindleMetricAsync(
|
||||
Func<short, CancellationToken, Task<FocasResult<IReadOnlyList<WireSpindleMetric>>>> call,
|
||||
CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user