|
@@ -260,33 +260,19 @@ void Endstops::poll() {
|
260
|
260
|
void Endstops::enable_globally(const bool onoff) {
|
261
|
261
|
enabled_globally = enabled = onoff;
|
262
|
262
|
|
263
|
|
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
264
|
|
- update();
|
265
|
|
- #endif
|
|
263
|
+ update();
|
266
|
264
|
}
|
267
|
265
|
|
268
|
266
|
// Enable / disable endstop checking
|
269
|
267
|
void Endstops::enable(const bool onoff) {
|
270
|
268
|
enabled = onoff;
|
271
|
269
|
|
272
|
|
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
273
|
|
- update();
|
274
|
|
- #endif
|
|
270
|
+ update();
|
275
|
271
|
}
|
276
|
272
|
|
277
|
273
|
// Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
|
278
|
274
|
void Endstops::not_homing() {
|
279
|
275
|
enabled = enabled_globally;
|
280
|
|
-
|
281
|
|
- // Still 'enabled'? Then endstops are always on and kept in sync.
|
282
|
|
- // Otherwise reset 'live's variables to let axes move in both directions.
|
283
|
|
- if (!enabled) {
|
284
|
|
- #if ENDSTOP_NOISE_THRESHOLD
|
285
|
|
- endstop_poll_count = 0; // Stop filtering (MUST be done first to prevent race condition)
|
286
|
|
- validated_live_state = 0;
|
287
|
|
- #endif
|
288
|
|
- live_state = 0;
|
289
|
|
- }
|
290
|
276
|
}
|
291
|
277
|
|
292
|
278
|
#if ENABLED(VALIDATE_HOMING_ENDSTOPS)
|
|
@@ -302,9 +288,7 @@ void Endstops::not_homing() {
|
302
|
288
|
void Endstops::enable_z_probe(const bool onoff) {
|
303
|
289
|
z_probe_enabled = onoff;
|
304
|
290
|
|
305
|
|
- #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
306
|
|
- update();
|
307
|
|
- #endif
|
|
291
|
+ update();
|
308
|
292
|
}
|
309
|
293
|
#endif
|
310
|
294
|
|