Skip to content

Commit

Permalink
Fix polled update TCode duration sent as seconds instead of milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoooi0 committed Feb 9, 2024
1 parent 5dbb07b commit 12e9a3f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected override void Run(CancellationToken token)
var value = MathUtils.Lerp(settings.Minimum / 100, settings.Maximum / 100, snapshot.KeyframeTo.Value);
var duration = snapshot.Duration;

var command = DeviceAxis.ToString(axis, value, duration);
var command = DeviceAxis.ToString(axis, value, duration * 1000);
if (client.IsConnected && !string.IsNullOrWhiteSpace(command))
{
Logger.Trace("Sending \"{0}\" to \"{1}\"", command, PipeName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ protected override void Run(CancellationToken token)
var value = MathUtils.Lerp(settings.Minimum / 100, settings.Maximum / 100, snapshot.KeyframeTo.Value);
var duration = snapshot.Duration;

var command = DeviceAxis.ToString(axis, value, duration);
var command = DeviceAxis.ToString(axis, value, duration * 1000);
if (serialPort.IsOpen && !string.IsNullOrWhiteSpace(command))
{
Logger.Trace("Sending \"{0}\" to \"{1}\"", command, SelectedSerialPortDeviceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected override void Run(CancellationToken token)
var value = MathUtils.Lerp(settings.Minimum / 100, settings.Maximum / 100, snapshot.KeyframeTo.Value);
var duration = snapshot.Duration;

var command = DeviceAxis.ToString(axis, value, duration);
var command = DeviceAxis.ToString(axis, value, duration * 1000);
if (client.Connected && !string.IsNullOrWhiteSpace(command))
{
Logger.Trace("Sending \"{0}\" to \"{1}\"", command, $"tcp://{Endpoint.ToUriString()}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected override void Run(CancellationToken token)
var value = MathUtils.Lerp(settings.Minimum / 100, settings.Maximum / 100, snapshot.KeyframeTo.Value);
var duration = snapshot.Duration;

var command = DeviceAxis.ToString(axis, value, duration);
var command = DeviceAxis.ToString(axis, value, duration * 1000);
if (!string.IsNullOrWhiteSpace(command))
{
Logger.Trace("Sending \"{0}\" to \"{1}\"", command, $"udp://{Endpoint.ToUriString()}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ await PolledUpdateAsync(DeviceAxis.All, () => !token.IsCancellationRequested, as
var value = MathUtils.Lerp(settings.Minimum / 100, settings.Maximum / 100, snapshot.KeyframeTo.Value);
var duration = snapshot.Duration;

var command = DeviceAxis.ToString(axis, value, duration);
var command = DeviceAxis.ToString(axis, value, duration * 1000);
if (client.State == WebSocketState.Open && !string.IsNullOrWhiteSpace(command))
{
Logger.Trace("Sending \"{0}\" to \"{1}\"", command, Uri.ToString());
Expand Down

0 comments on commit 12e9a3f

Please sign in to comment.