Project

General

Profile

Revision 202090d4

View differences:

tests/automata/microwave.lus
80 80
var 
81 81
  CLEAR_PRESSED, START_PRESSED:  bool; 
82 82
  steps_remaining, steps_to_cook: int;
83
  left, middle, right: int; 
83 84
let
84 85

  
85 86
  CLEAR_PRESSED = kp_clear -> (kp_clear and (not (pre kp_clear)));
......
88 89

  
89 90
  automaton microwave_automaton
90 91
  state SETUP :
91
  var setup_left, setup_middle, setup_right: int;
92 92
  let
93 93
    mode = 1;
94 94

  
......
106 106
  tel until START_PRESSED && steps_to_remaining > 0 restart RUNNING
107 107
  
108 108
  state RUNNING :
109
  var left, middle, right: int; 
109
  unless CLEAR_PRESSED && mode = 3 restart SETUP
110 110
  let
111 111
    -- we print current remaining steps
112 112
    left = steps_remaining div 60;
......
132 132

  
133 133
    state SUSPENDED :
134 134
    unless start && door_closed restart COOKING
135
    unless CLEAR_PRESSED restart SETUP
136 135
    let
137 136
      mode = 3;
138 137
    tel

Also available in: Unified diff