Skip to content

Commit

Permalink
Add transition to state STOP -> IDLE (#1393)
Browse files Browse the repository at this point in the history
Fixes #1392.

```ChangeLog
Добавлен переход к состоянию по условию из состояния "Остановка" в — "Простой";
```
  • Loading branch information
KirillGutyrchik authored Jun 14, 2024
1 parent 1729c5f commit 006417e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void GetStepName_NewStep_ReturnExpectedName(string defaultName,
{
new object[] { RUN, true, 15 },
new object[] { RUN, false, 15 },
new object[] { STOP, true, 14 },
new object[] { STOP, true, 15 },
new object[] { STOP, false, 15 },
new object[] { PAUSE, true, 15 },
new object[] { PAUSE, false, 15 },
Expand All @@ -64,7 +64,7 @@ public void Constructor_NewStep_CheckActionsCount(State state,
}

private static readonly int NotMainStepActionsCount = 19;
private static readonly int MainStepActionsCount = 14;
private static readonly int MainStepActionsCount = 15;
private static readonly int MainStepActionsWithToStateCount = 15;

static object[] Constructor_NewStep_CheckItemsCountCases =
Expand Down
4 changes: 4 additions & 0 deletions src/TechObject/ObjectsTree/UniversalObject/Step.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ public void SetJumpToStateIf()
{
CBParameterValues.Add( State.stateStr[STOP], STOP.ToString());
}
else if (Owner.Type == State.StateType.STOP)
{
CBParameterValues.Add(State.stateStr[IDLE], IDLE.ToString());
}
else return;

var toStateByConditionAction = new ActionGroupCustom(
Expand Down

0 comments on commit 006417e

Please sign in to comment.