|
|
|
@ -5280,7 +5280,7 @@ void home_all_axes() { gcode_G28(true); }
|
|
|
|
|
#if DISABLED(PROBE_MANUALLY)
|
|
|
|
|
home_offset[Z_AXIS] -= probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
|
|
|
|
|
float z_at_pt[13] = { 0.0 };
|
|
|
|
@ -5380,7 +5380,7 @@ void home_all_axes() { gcode_G28(true); }
|
|
|
|
|
#if ENABLED(PROBE_MANUALLY)
|
|
|
|
|
test_precision = 0.00; // forced end
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (probe_points) {
|
|
|
|
|
case 1:
|
|
|
|
|
test_precision = 0.00; // forced end
|
|
|
|
@ -5854,7 +5854,7 @@ inline void gcode_G92() {
|
|
|
|
|
WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT); // turn spindle off
|
|
|
|
|
delay_for_power_down();
|
|
|
|
|
}
|
|
|
|
|
digitalWrite(SPINDLE_DIR_PIN, rotation_dir);
|
|
|
|
|
WRITE(SPINDLE_DIR_PIN, rotation_dir);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -6259,7 +6259,7 @@ inline void gcode_M17() {
|
|
|
|
|
inline void gcode_M23() {
|
|
|
|
|
// Simplify3D includes the size, so zero out all spaces (#7227)
|
|
|
|
|
for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0';
|
|
|
|
|
card.openFile(parser.string_arg, true);
|
|
|
|
|
card.openFile(parser.string_arg, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -6474,20 +6474,20 @@ inline void gcode_M42() {
|
|
|
|
|
else {
|
|
|
|
|
report_pin_state_extended(pin, I_flag, true, "Pulsing ");
|
|
|
|
|
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
|
|
|
|
|
if (pin == 46) {
|
|
|
|
|
SET_OUTPUT(46);
|
|
|
|
|
if (pin == TEENSY_E2) {
|
|
|
|
|
SET_OUTPUT(TEENSY_E2);
|
|
|
|
|
for (int16_t j = 0; j < repeat; j++) {
|
|
|
|
|
WRITE(46, 0); safe_delay(wait);
|
|
|
|
|
WRITE(46, 1); safe_delay(wait);
|
|
|
|
|
WRITE(46, 0); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E2, LOW); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E2, HIGH); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E2, LOW); safe_delay(wait);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (pin == 47) {
|
|
|
|
|
SET_OUTPUT(47);
|
|
|
|
|
else if (pin == TEENSY_E3) {
|
|
|
|
|
SET_OUTPUT(TEENSY_E3);
|
|
|
|
|
for (int16_t j = 0; j < repeat; j++) {
|
|
|
|
|
WRITE(47, 0); safe_delay(wait);
|
|
|
|
|
WRITE(47, 1); safe_delay(wait);
|
|
|
|
|
WRITE(47, 0); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E3, LOW); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E3, HIGH); safe_delay(wait);
|
|
|
|
|
WRITE(TEENSY_E3, LOW); safe_delay(wait);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -6569,10 +6569,10 @@ inline void gcode_M42() {
|
|
|
|
|
for (uint8_t i = 0; i < 4; i++) {
|
|
|
|
|
servo[probe_index].move(z_servo_angle[0]); //deploy
|
|
|
|
|
safe_delay(500);
|
|
|
|
|
deploy_state = digitalRead(PROBE_TEST_PIN);
|
|
|
|
|
deploy_state = READ(PROBE_TEST_PIN);
|
|
|
|
|
servo[probe_index].move(z_servo_angle[1]); //stow
|
|
|
|
|
safe_delay(500);
|
|
|
|
|
stow_state = digitalRead(PROBE_TEST_PIN);
|
|
|
|
|
stow_state = READ(PROBE_TEST_PIN);
|
|
|
|
|
}
|
|
|
|
|
if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
|
|
|
|
|
|
|
|
|
@ -6607,9 +6607,9 @@ inline void gcode_M42() {
|
|
|
|
|
if (0 == j % (500 * 1)) // keep cmd_timeout happy
|
|
|
|
|
refresh_cmd_timeout();
|
|
|
|
|
|
|
|
|
|
if (deploy_state != digitalRead(PROBE_TEST_PIN)) { // probe triggered
|
|
|
|
|
if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
|
|
|
|
|
|
|
|
|
|
for (probe_counter = 1; probe_counter < 50 && deploy_state != digitalRead(PROBE_TEST_PIN); ++probe_counter)
|
|
|
|
|
for (probe_counter = 1; probe_counter < 50 && deploy_state != READ(PROBE_TEST_PIN); ++probe_counter)
|
|
|
|
|
safe_delay(2);
|
|
|
|
|
|
|
|
|
|
if (probe_counter == 50)
|
|
|
|
@ -6671,7 +6671,7 @@ inline void gcode_M42() {
|
|
|
|
|
if (parser.seen('E')) {
|
|
|
|
|
endstop_monitor_flag = parser.value_bool();
|
|
|
|
|
SERIAL_PROTOCOLPGM("endstop monitor ");
|
|
|
|
|
SERIAL_PROTOCOL(endstop_monitor_flag ? "en" : "dis");
|
|
|
|
|
serialprintPGM(endstop_monitor_flag ? PSTR("en") : PSTR("dis"));
|
|
|
|
|
SERIAL_PROTOCOLLNPGM("abled");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -9876,9 +9876,9 @@ inline void gcode_M907() {
|
|
|
|
|
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) {
|
|
|
|
|
analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness );
|
|
|
|
|
}
|
|
|
|
|
else digitalWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH );
|
|
|
|
|
else WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH);
|
|
|
|
|
}
|
|
|
|
|
else digitalWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? HIGH : LOW);
|
|
|
|
|
else WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? HIGH : LOW);
|
|
|
|
|
}
|
|
|
|
|
#endif // HAS_CASE_LIGHT
|
|
|
|
|
|
|
|
|
@ -12877,7 +12877,7 @@ void kill(const char* lcd_msg) {
|
|
|
|
|
#if defined(ACTION_ON_KILL)
|
|
|
|
|
SERIAL_ECHOLNPGM("//action:" ACTION_ON_KILL);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_POWER_SWITCH
|
|
|
|
|
SET_INPUT(PS_ON_PIN);
|
|
|
|
|
#endif
|
|
|
|
|