Don't declare variables which never get used
Fix a compiler warning about "unused variables" when no endstops are defined.
This commit is contained in:
parent
890879e7ee
commit
4f30e270b2
|
|
@ -668,8 +668,14 @@ void process_gcode_command() {
|
||||||
endstops_on();
|
endstops_on();
|
||||||
delay_ms(10); // allow the signal to stabilize
|
delay_ms(10); // allow the signal to stabilize
|
||||||
{
|
{
|
||||||
const char* const open = PSTR("open ");
|
#if ! (defined(X_MIN_PIN) || defined(X_MAX_PIN) || \
|
||||||
const char* const triggered = PSTR("triggered ");
|
defined(Y_MIN_PIN) || defined(Y_MAX_PIN) || \
|
||||||
|
defined(Z_MIN_PIN) || defined(Z_MAX_PIN))
|
||||||
|
serial_writestr_P(PSTR("No endstops defined."));
|
||||||
|
#else
|
||||||
|
const char* const open = PSTR("open ");
|
||||||
|
const char* const triggered = PSTR("triggered ");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(X_MIN_PIN)
|
#if defined(X_MIN_PIN)
|
||||||
serial_writestr_P(PSTR("x_min:"));
|
serial_writestr_P(PSTR("x_min:"));
|
||||||
|
|
@ -695,11 +701,6 @@ void process_gcode_command() {
|
||||||
serial_writestr_P(PSTR("z_max:"));
|
serial_writestr_P(PSTR("z_max:"));
|
||||||
z_max() ? serial_writestr_P(triggered) : serial_writestr_P(open);
|
z_max() ? serial_writestr_P(triggered) : serial_writestr_P(open);
|
||||||
#endif
|
#endif
|
||||||
#if ! (defined(X_MIN_PIN) || defined(X_MAX_PIN) || \
|
|
||||||
defined(Y_MIN_PIN) || defined(Y_MAX_PIN) || \
|
|
||||||
defined(Z_MIN_PIN) || defined(Z_MAX_PIN))
|
|
||||||
serial_writestr_P(PSTR("No endstops defined."));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
endstops_off();
|
endstops_off();
|
||||||
serial_writechar('\n');
|
serial_writechar('\n');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue