Skip to content

Commit

Permalink
Merge pull request #25 from simatic-ax/bug_fix
Browse files Browse the repository at this point in the history
Fix: Wrong guard assignment
  • Loading branch information
sjuergen authored Jun 10, 2024
2 parents d8312ef + db736e8 commit 420b300
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Configuration.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ CONFIGURATION MyConfiguration

// State RedYellow
RedYellowGuard : TimeoutGuard := (Timeout := T#1500ms);
RedYellowToGreen : Transition := (Guard := RedGuard, NextState := GreenState);
RedYellowToGreen : Transition := (Guard := RedYellowGuard, NextState := GreenState);
RedYellowState : StateRedYellow := (StateName := 'RedYellow', Transition1 := RedYellowToGreen, LightStack := REF(TrafficLight));

// State Green
Green : TimeoutGuard := (Timeout := T#1500ms);
Green2Yellow : Transition := (Guard := RedGuard, NextState := YellowState);
GreenGuard : TimeoutGuard := (Timeout := T#1500ms);
Green2Yellow : Transition := (Guard := GreenGuard, NextState := YellowState);
GreenState : StateGreen := (StateName := 'Green', Transition1 := Green2Yellow, LightStack := REF(TrafficLight));

// State Yellow
YellowGuard : TimeoutGuard := (Timeout := T#1500ms);
Yellow2Count : Transition := (Guard := RedGuard, NextState := CycleCountState);
Yellow2Count : Transition := (Guard := YellowGuard, NextState := CycleCountState);
YellowState : StateYellow := (StateName := 'Yellow', Transition1 := Yellow2Count, LightStack := REF(TrafficLight));

// Check Cycles
Expand Down

0 comments on commit 420b300

Please sign in to comment.