Skip to content

Commit

Permalink
Edit C_THLD parameters (savushkin-r-d#1211)
Browse files Browse the repository at this point in the history
Fixes savushkin-r-d#1210.
- delete P_ON_TIME and P_OFF_TIME parameters
- rename P_DELTA to P_delta
  • Loading branch information
KirillGutyrchik authored Sep 11, 2023
1 parent 5389978 commit 350582d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
7 changes: 2 additions & 5 deletions EasyEplanner.Tests/EplanDevice.Test/IODevice.Test/C.Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,7 @@ private static object[] ParametersTestData()
var paramters_THLD = new string[]
{
IODevice.Parameter.P_is_reverse,
IODevice.Parameter.P_DELTA,
IODevice.Parameter.P_ON_TIME,
IODevice.Parameter.P_OFF_TIME,

IODevice.Parameter.P_delta,
};

var defaultValues = new double[]
Expand Down Expand Up @@ -183,7 +180,7 @@ private static object[] ParametersTestData()
new object[]
{
paramters_THLD,
new double[]{ 0, 0, 0, 0, },
new double[]{ 0, 0, },
C_THLD,
GetNewCDevice(),
},
Expand Down
4 changes: 1 addition & 3 deletions docs/user_manual/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -1043,9 +1043,7 @@ C_THLD | Пороговый регулятор.
<tr> <td rowspan = 4> <b>
C_THLD<br>(пороговый регулятор)
<td> <b> P_is_reverse <td> Выход обратного действия (1 - true, 0 - false). Задает вектор изменения измеряемой величины. <tr>
<td> <b> P_DELTA <td> Дельта срабатывания, % <tr>
<td> <b> P_ON_TIME <td> Задержка включения, <i>мс</i> <tr>
<td> <b> P_OFF_TIME <td> Задержка выключения, <i>мс</i>
<td> <b> P_delta <td> Дельта срабатывания, % <tr>
<tr> <td rowspan = 4> <b>
CAM
<td> <b> P_READY_TIME <td> Предельное время отсутствия готовности к работе, с (для <i>CAM_DO1_DI2</i> и <i>CAM_DO1_DI3</i>)
Expand Down
5 changes: 1 addition & 4 deletions src/Device/IODevices/C.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ public override string SetSubType(string subType)
properties.Add(Property.OUT_VALUE, null);

parameters.Add(Parameter.P_is_reverse, null);
parameters.Add(Parameter.P_DELTA, null);
parameters.Add(Parameter.P_ON_TIME, null);
parameters.Add(Parameter.P_OFF_TIME, null);

parameters.Add(Parameter.P_delta, null);
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions src/Device/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public class Parameter
public static readonly Parameter P_ERR_MIN_FLOW = new Parameter("P_ERR_MIN_FLOW", "Ошибка счета импульсов");

/// <summary> Дельта значение </summary>
public static readonly Parameter P_DELTA = new Parameter(nameof(P_DELTA), "Дельта срабатывания");
public static readonly Parameter P_delta = new Parameter(nameof(P_delta), "Дельта срабатывания");

protected static readonly Lazy<Dictionary<string, Parameter>> AllParameters = InitParameters();

Expand Down Expand Up @@ -211,7 +211,7 @@ public static string GetFormatValue(Parameter parameter, object value, IODevice
return string.Format(UnitFormat.Kilograms, displayedValue);
break;
case DeviceType.C:
if (parameter == P_max || parameter == P_min || parameter == P_DELTA)
if (parameter == P_max || parameter == P_min || parameter == P_delta)
{
var inValue = device.Properties[Property.IN_VALUE];

Expand Down

0 comments on commit 350582d

Please sign in to comment.