-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJavaDBL
49 lines (42 loc) · 1.09 KB
/
JavaDBL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
public class Software {
// representing the registers on the pp2
int registerZero;
int registerOne;
int registerTwo;
int registerThree;
int registerFour;
int registerFive;
// bound in uppaal
int revolutionCounter = 0;
// general booleans
boolean disc_dispenser_running = false;
boolean storage_tube_empty = false;
boolean emergency_stop = false;
boolean motor1_running = false;
boolean motor2_running_right = false;
boolean motor2_running_left = false;
boolean black_disc_detected = false;
boolean white_disc_detected = false;
boolean is_in_cycle = false;
// buttons
boolean start_stop_button_pressed = false;
boolean push_sensor_pressed = false;
boolean abort_button_pressed = false;
// sensors
int photo_cell_2 = 0;
int photo_cell_1 = 0;
public static void main(String[] args) {
}
// name stands for maincontrol halting
public void sspmh() {
while (true) {
if (start_stop_button_pressed) {
disc_dispenser_running = true;
storage_tube_empty = false;
start_stop_button_pressed = false;
revolutionCounter = 0;
break; // break out of the loop
}
}
}
}