|
|
@@ -28,7 +28,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
private RunningStatus runningStatus = RunningStatus.SpatialNormal;
|
|
|
private double hoistDrumDiameter = 750;
|
|
|
private double encoderResolution = 1000;
|
|
|
- private double ratedHeight;
|
|
|
+ private double ratedHeight = 20;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 绳号
|
|
|
@@ -293,7 +293,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- parameter.SamplingStep = (float)(Math.PI * hoistDrumDiameter * parameter.FrequencyDivisionFactor / encoderResolution);
|
|
|
+ parameter.SamplingStep = Math.Round(Math.PI * hoistDrumDiameter * parameter.FrequencyDivisionFactor / encoderResolution, 5);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -312,8 +312,6 @@ namespace SWRIS.Models.ViewModel
|
|
|
public List<KeyAndValueDto> WireSurfaceTypes => TypeExtension.ToKeyAndDescriptionList(typeof(WireSurfaceType));
|
|
|
public List<KeyAndValueDto> RiskLevels => TypeExtension.ToKeyAndDescriptionList(typeof(RiskLevel));
|
|
|
|
|
|
-
|
|
|
-
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
protected internal virtual void OnPropertyChanged(string propertyName)
|
|
|
{
|
|
|
@@ -324,31 +322,31 @@ namespace SWRIS.Models.ViewModel
|
|
|
{
|
|
|
private string mainBoardSoftwareVersion;
|
|
|
private short sensorCount;
|
|
|
- private float samplingStep;
|
|
|
+ private double samplingStep;
|
|
|
private short frequencyDivisionFactor;
|
|
|
private short damageInterval;
|
|
|
private short damageThreshold;
|
|
|
private short scrapUpperLimit;
|
|
|
private short frontMagnetLength;
|
|
|
private short backMagnetLength;
|
|
|
- private float valueCoefficient;
|
|
|
- private float effectiveStrokeLength;
|
|
|
+ private double valueCoefficient;
|
|
|
+ private double effectiveStrokeLength;
|
|
|
private short zeroPositionCorrectionDuration;
|
|
|
private short zeroPositionCorrectionOffset;
|
|
|
- private float warningValue;
|
|
|
- private float alarmValue;
|
|
|
+ private double warningValue;
|
|
|
+ private double alarmValue;
|
|
|
private short soundLightAlarmAutoResetMode;
|
|
|
private short wireRopeType;
|
|
|
private short wireRopeCount;
|
|
|
- private float wireRopeLength;
|
|
|
- private float wireRopeDiameter;
|
|
|
+ private double wireRopeLength;
|
|
|
+ private double wireRopeDiameter;
|
|
|
private short wireRopeStrandCount;
|
|
|
private short wireRopeStrandWireCount;
|
|
|
private EncoderDirection encoderDirection;
|
|
|
private DateTime? systemTime;
|
|
|
- private float twistFactor;
|
|
|
- private float firstCalibrationPositiont;
|
|
|
- private float secondCalibrationPositiont;
|
|
|
+ private double twistFactor;
|
|
|
+ private double firstCalibrationPositiont;
|
|
|
+ private double secondCalibrationPositiont;
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -378,7 +376,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 采样步长 单位:mm/点 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float SamplingStep
|
|
|
+ public double SamplingStep
|
|
|
{
|
|
|
get => samplingStep;
|
|
|
set
|
|
|
@@ -387,6 +385,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
OnPropertyChanged(nameof(SamplingStep));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 分频系数
|
|
|
/// </summary>
|
|
|
@@ -462,7 +461,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 量值系数 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float ValueCoefficient
|
|
|
+ public double ValueCoefficient
|
|
|
{
|
|
|
get => valueCoefficient;
|
|
|
set
|
|
|
@@ -474,7 +473,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 零位有效行程长度,单位:m 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float EffectiveStrokeLength
|
|
|
+ public double EffectiveStrokeLength
|
|
|
{
|
|
|
get => effectiveStrokeLength;
|
|
|
set
|
|
|
@@ -510,7 +509,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 预警(黄色报警)量值 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float WarningValue
|
|
|
+ public double WarningValue
|
|
|
{
|
|
|
get => warningValue;
|
|
|
set
|
|
|
@@ -522,7 +521,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 报警(红色报警)量值 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float AlarmValue
|
|
|
+ public double AlarmValue
|
|
|
{
|
|
|
get => alarmValue;
|
|
|
set
|
|
|
@@ -570,36 +569,21 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 钢丝绳长度,单位:m 4字节浮点数(供协议打包/持久化使用)
|
|
|
/// </summary>
|
|
|
- public float WireRopeLength
|
|
|
+ public double WireRopeLength
|
|
|
{
|
|
|
get => wireRopeLength;
|
|
|
set
|
|
|
{
|
|
|
// 统一保留 2 位小数,避免浮点运算产生冗长小数位
|
|
|
- wireRopeLength = (float)Math.Round(value, 2, MidpointRounding.AwayFromZero);
|
|
|
- OnPropertyChanged(nameof(WireRopeLength));
|
|
|
- OnPropertyChanged(nameof(WireRopeLengthValue));
|
|
|
- }
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 钢丝绳长度(double 显示值,供输入框绑定)。
|
|
|
- /// float 转 double 会产生二进制噪声(如 41.2f → 41.200000762939453),
|
|
|
- /// 故暴露 double 值并四舍五入到 2 位小数后再绑定。
|
|
|
- /// </summary>
|
|
|
- public double WireRopeLengthValue
|
|
|
- {
|
|
|
- get => Math.Round(wireRopeLength, 2);
|
|
|
- set
|
|
|
- {
|
|
|
- wireRopeLength = (float)Math.Round(value, 2, MidpointRounding.AwayFromZero);
|
|
|
+ wireRopeLength = Math.Round(value, 2, MidpointRounding.AwayFromZero);
|
|
|
OnPropertyChanged(nameof(WireRopeLength));
|
|
|
- OnPropertyChanged(nameof(WireRopeLengthValue));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 钢丝绳直径,单位:mm 4字节浮点数
|
|
|
/// </summary>
|
|
|
- public float WireRopeDiameter
|
|
|
+ public double WireRopeDiameter
|
|
|
{
|
|
|
get => wireRopeDiameter;
|
|
|
set
|
|
|
@@ -660,7 +644,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// 判伤捻距系数,浮点数,判伤捻距默认为7d,可通过此参数设置系数来调整(与损伤判定相关)。
|
|
|
/// 默认值为1.0,设置2.0表示判伤捻距为2 x 7 = 14d
|
|
|
/// </summary>
|
|
|
- public float TwistFactor
|
|
|
+ public double TwistFactor
|
|
|
{
|
|
|
get => twistFactor;
|
|
|
set
|
|
|
@@ -673,7 +657,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 限位1校准位置
|
|
|
/// </summary>
|
|
|
- public float FirstCalibrationPositiont
|
|
|
+ public double FirstCalibrationPositiont
|
|
|
{
|
|
|
get => firstCalibrationPositiont;
|
|
|
set
|
|
|
@@ -685,7 +669,7 @@ namespace SWRIS.Models.ViewModel
|
|
|
/// <summary>
|
|
|
/// 限位2校准位置
|
|
|
/// </summary>
|
|
|
- public float SecondCalibrationPositiont
|
|
|
+ public double SecondCalibrationPositiont
|
|
|
{
|
|
|
get => secondCalibrationPositiont;
|
|
|
set
|