Add flags to TelemetryDataSpinDto

This commit is contained in:
ngfrolov 2022-10-31 17:57:52 +05:00
parent 3d644753ed
commit 3b64968e77

View File

@ -3,6 +3,9 @@
namespace AsbCloudApp.Data.SAUB namespace AsbCloudApp.Data.SAUB
{ {
#nullable enable #nullable enable
/// <summary>
/// телеметрия спин мастер
/// </summary>
public class TelemetryDataSpinDto : ITelemetryData public class TelemetryDataSpinDto : ITelemetryData
{ {
/// <summary> /// <summary>
@ -73,6 +76,16 @@ namespace AsbCloudApp.Data.SAUB
/// Переменная этапа /// Переменная этапа
/// </summary> /// </summary>
public short? State { get; set; } public short? State { get; set; }
/// <summary>
/// Осцилляция включена
/// </summary>
public bool IsOscillating => State != 0 & State != 6 & State != 7;
/// <summary>
/// Демпфирование включено
/// </summary>
public bool IsDampening => State == 7 && (Mode & 2) > 0;
} }
#nullable disable #nullable disable
} }