|
@@ -87,9 +87,8 @@ void StressTestScreen::runTestOnBootup(bool enable) {
|
87
|
87
|
}
|
88
|
88
|
|
89
|
89
|
void StressTestScreen::startupCheck() {
|
90
|
|
- if (LockScreen::get_hash() == 0xDEAD) {
|
|
90
|
+ if (LockScreen::get_hash() == 0xDEAD)
|
91
|
91
|
GOTO_SCREEN(StressTestScreen);
|
92
|
|
- }
|
93
|
92
|
}
|
94
|
93
|
|
95
|
94
|
void StressTestScreen::onEntry() {
|
|
@@ -120,20 +119,20 @@ void StressTestScreen::onIdle() {
|
120
|
119
|
reset_menu_timeout();
|
121
|
120
|
|
122
|
121
|
if (!commandsInQueue()) {
|
123
|
|
- if (!isPositionKnown()) {
|
124
|
|
- extern const char G28_STR[];
|
125
|
|
- injectCommands_P(G28_STR);
|
126
|
|
- }
|
127
|
|
- else {
|
128
|
|
- injectCommands_P(PSTR(
|
129
|
|
- "G0 X100 Y100 Z100 F6000\n"
|
130
|
|
- "T0\nG4 S1"
|
131
|
|
- #if EXTRUDERS > 1
|
132
|
|
- "\nT1\nG4 S1"
|
133
|
|
- #endif
|
134
|
|
- "\nG0 X150 Y150 Z150"
|
135
|
|
- ));
|
136
|
|
- }
|
|
122
|
+ if (!isPositionKnown()) {
|
|
123
|
+ extern const char G28_STR[];
|
|
124
|
+ injectCommands_P(G28_STR);
|
|
125
|
+ }
|
|
126
|
+ else {
|
|
127
|
+ injectCommands_P(PSTR(
|
|
128
|
+ "G0 X100 Y100 Z100 F6000\n"
|
|
129
|
+ "T0\nG4 S1"
|
|
130
|
+ #if EXTRUDERS > 1
|
|
131
|
+ "\nT1\nG4 S1"
|
|
132
|
+ #endif
|
|
133
|
+ "\nG0 X150 Y150 Z150"
|
|
134
|
+ ));
|
|
135
|
+ }
|
137
|
136
|
}
|
138
|
137
|
|
139
|
138
|
if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) {
|
|
@@ -141,10 +140,10 @@ void StressTestScreen::onIdle() {
|
141
|
140
|
}
|
142
|
141
|
|
143
|
142
|
if (watchDogTestNow()) {
|
144
|
|
- if (random(2) % 2)
|
145
|
|
- iterativeLockup();
|
146
|
|
- else
|
147
|
|
- recursiveLockup();
|
|
143
|
+ if (random(2) % 2)
|
|
144
|
+ iterativeLockup();
|
|
145
|
+ else
|
|
146
|
+ recursiveLockup();
|
148
|
147
|
}
|
149
|
148
|
|
150
|
149
|
BaseScreen::onIdle();
|