Skip to content

Commit

Permalink
Fix TCode not appending new line
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoooi0 committed May 25, 2021
1 parent db60b24 commit 5e8e1cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MultiFunPlayer/Common/DataFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class TCode
public static string ToString(DeviceAxis axis, float value, int interval) => $"{ToString(axis, value)}I{interval}";

public static string ToString(IEnumerable<KeyValuePair<DeviceAxis, float>> values, int interval)
=> values.Aggregate(string.Empty, (s, x) => $"{s} {ToString(x.Key, x.Value, interval)}");
=> $"{values.Aggregate(string.Empty, (s, x) => $"{s} {ToString(x.Key, x.Value, interval)}")}\n";

public static bool IsDirty(float value, float lastValue)
=> float.IsFinite(value) && (!float.IsFinite(lastValue) || MathF.Abs(lastValue - value) * 999 >= 1);
Expand Down

0 comments on commit 5e8e1cd

Please sign in to comment.