|
@@ -5280,7 +5280,7 @@ void home_all_axes() { gcode_G28(true); }
|
5280
|
5280
|
#if DISABLED(PROBE_MANUALLY)
|
5281
|
5281
|
home_offset[Z_AXIS] -= probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
5282
|
5282
|
#endif
|
5283
|
|
-
|
|
5283
|
+
|
5284
|
5284
|
do {
|
5285
|
5285
|
|
5286
|
5286
|
float z_at_pt[13] = { 0.0 };
|
|
@@ -5380,7 +5380,7 @@ void home_all_axes() { gcode_G28(true); }
|
5380
|
5380
|
#if ENABLED(PROBE_MANUALLY)
|
5381
|
5381
|
test_precision = 0.00; // forced end
|
5382
|
5382
|
#endif
|
5383
|
|
-
|
|
5383
|
+
|
5384
|
5384
|
switch (probe_points) {
|
5385
|
5385
|
case 1:
|
5386
|
5386
|
test_precision = 0.00; // forced end
|
|
@@ -5854,7 +5854,7 @@ inline void gcode_G92() {
|
5854
|
5854
|
WRITE(SPINDLE_LASER_ENABLE_PIN, !SPINDLE_LASER_ENABLE_INVERT); // turn spindle off
|
5855
|
5855
|
delay_for_power_down();
|
5856
|
5856
|
}
|
5857
|
|
- digitalWrite(SPINDLE_DIR_PIN, rotation_dir);
|
|
5857
|
+ WRITE(SPINDLE_DIR_PIN, rotation_dir);
|
5858
|
5858
|
#endif
|
5859
|
5859
|
|
5860
|
5860
|
/**
|
|
@@ -6259,7 +6259,7 @@ inline void gcode_M17() {
|
6259
|
6259
|
inline void gcode_M23() {
|
6260
|
6260
|
// Simplify3D includes the size, so zero out all spaces (#7227)
|
6261
|
6261
|
for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0';
|
6262
|
|
- card.openFile(parser.string_arg, true);
|
|
6262
|
+ card.openFile(parser.string_arg, true);
|
6263
|
6263
|
}
|
6264
|
6264
|
|
6265
|
6265
|
/**
|
|
@@ -6474,20 +6474,20 @@ inline void gcode_M42() {
|
6474
|
6474
|
else {
|
6475
|
6475
|
report_pin_state_extended(pin, I_flag, true, "Pulsing ");
|
6476
|
6476
|
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
|
6477
|
|
- if (pin == 46) {
|
6478
|
|
- SET_OUTPUT(46);
|
|
6477
|
+ if (pin == TEENSY_E2) {
|
|
6478
|
+ SET_OUTPUT(TEENSY_E2);
|
6479
|
6479
|
for (int16_t j = 0; j < repeat; j++) {
|
6480
|
|
- WRITE(46, 0); safe_delay(wait);
|
6481
|
|
- WRITE(46, 1); safe_delay(wait);
|
6482
|
|
- WRITE(46, 0); safe_delay(wait);
|
|
6480
|
+ WRITE(TEENSY_E2, LOW); safe_delay(wait);
|
|
6481
|
+ WRITE(TEENSY_E2, HIGH); safe_delay(wait);
|
|
6482
|
+ WRITE(TEENSY_E2, LOW); safe_delay(wait);
|
6483
|
6483
|
}
|
6484
|
6484
|
}
|
6485
|
|
- else if (pin == 47) {
|
6486
|
|
- SET_OUTPUT(47);
|
|
6485
|
+ else if (pin == TEENSY_E3) {
|
|
6486
|
+ SET_OUTPUT(TEENSY_E3);
|
6487
|
6487
|
for (int16_t j = 0; j < repeat; j++) {
|
6488
|
|
- WRITE(47, 0); safe_delay(wait);
|
6489
|
|
- WRITE(47, 1); safe_delay(wait);
|
6490
|
|
- WRITE(47, 0); safe_delay(wait);
|
|
6488
|
+ WRITE(TEENSY_E3, LOW); safe_delay(wait);
|
|
6489
|
+ WRITE(TEENSY_E3, HIGH); safe_delay(wait);
|
|
6490
|
+ WRITE(TEENSY_E3, LOW); safe_delay(wait);
|
6491
|
6491
|
}
|
6492
|
6492
|
}
|
6493
|
6493
|
else
|
|
@@ -6569,10 +6569,10 @@ inline void gcode_M42() {
|
6569
|
6569
|
for (uint8_t i = 0; i < 4; i++) {
|
6570
|
6570
|
servo[probe_index].move(z_servo_angle[0]); //deploy
|
6571
|
6571
|
safe_delay(500);
|
6572
|
|
- deploy_state = digitalRead(PROBE_TEST_PIN);
|
|
6572
|
+ deploy_state = READ(PROBE_TEST_PIN);
|
6573
|
6573
|
servo[probe_index].move(z_servo_angle[1]); //stow
|
6574
|
6574
|
safe_delay(500);
|
6575
|
|
- stow_state = digitalRead(PROBE_TEST_PIN);
|
|
6575
|
+ stow_state = READ(PROBE_TEST_PIN);
|
6576
|
6576
|
}
|
6577
|
6577
|
if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
|
6578
|
6578
|
|
|
@@ -6607,9 +6607,9 @@ inline void gcode_M42() {
|
6607
|
6607
|
if (0 == j % (500 * 1)) // keep cmd_timeout happy
|
6608
|
6608
|
refresh_cmd_timeout();
|
6609
|
6609
|
|
6610
|
|
- if (deploy_state != digitalRead(PROBE_TEST_PIN)) { // probe triggered
|
|
6610
|
+ if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
|
6611
|
6611
|
|
6612
|
|
- for (probe_counter = 1; probe_counter < 50 && deploy_state != digitalRead(PROBE_TEST_PIN); ++probe_counter)
|
|
6612
|
+ for (probe_counter = 1; probe_counter < 50 && deploy_state != READ(PROBE_TEST_PIN); ++probe_counter)
|
6613
|
6613
|
safe_delay(2);
|
6614
|
6614
|
|
6615
|
6615
|
if (probe_counter == 50)
|
|
@@ -6671,7 +6671,7 @@ inline void gcode_M42() {
|
6671
|
6671
|
if (parser.seen('E')) {
|
6672
|
6672
|
endstop_monitor_flag = parser.value_bool();
|
6673
|
6673
|
SERIAL_PROTOCOLPGM("endstop monitor ");
|
6674
|
|
- SERIAL_PROTOCOL(endstop_monitor_flag ? "en" : "dis");
|
|
6674
|
+ serialprintPGM(endstop_monitor_flag ? PSTR("en") : PSTR("dis"));
|
6675
|
6675
|
SERIAL_PROTOCOLLNPGM("abled");
|
6676
|
6676
|
return;
|
6677
|
6677
|
}
|
|
@@ -9876,9 +9876,9 @@ inline void gcode_M907() {
|
9876
|
9876
|
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) {
|
9877
|
9877
|
analogWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? 255 - case_light_brightness : case_light_brightness );
|
9878
|
9878
|
}
|
9879
|
|
- else digitalWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH );
|
|
9879
|
+ else WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? LOW : HIGH);
|
9880
|
9880
|
}
|
9881
|
|
- else digitalWrite(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? HIGH : LOW);
|
|
9881
|
+ else WRITE(CASE_LIGHT_PIN, INVERT_CASE_LIGHT ? HIGH : LOW);
|
9882
|
9882
|
}
|
9883
|
9883
|
#endif // HAS_CASE_LIGHT
|
9884
|
9884
|
|
|
@@ -12877,7 +12877,7 @@ void kill(const char* lcd_msg) {
|
12877
|
12877
|
#if defined(ACTION_ON_KILL)
|
12878
|
12878
|
SERIAL_ECHOLNPGM("//action:" ACTION_ON_KILL);
|
12879
|
12879
|
#endif
|
12880
|
|
-
|
|
12880
|
+
|
12881
|
12881
|
#if HAS_POWER_SWITCH
|
12882
|
12882
|
SET_INPUT(PS_ON_PIN);
|
12883
|
12883
|
#endif
|