ソースを参照

Fix CALIBRATION_GCODE pin handling

Scott Lahteine 4年前
コミット
7bf2190f03

+ 2
- 2
Marlin/Configuration_adv.h ファイルの表示

840
 
840
 
841
   // Define the pin to read during calibration
841
   // Define the pin to read during calibration
842
   #ifndef CALIBRATION_PIN
842
   #ifndef CALIBRATION_PIN
843
-    #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
844
-    #define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin
843
+    //#define CALIBRATION_PIN -1            // Define here to override the default pin
844
+    #define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
845
     //#define CALIBRATION_PIN_PULLDOWN
845
     //#define CALIBRATION_PIN_PULLDOWN
846
     #define CALIBRATION_PIN_PULLUP
846
     #define CALIBRATION_PIN_PULLUP
847
   #endif
847
   #endif

+ 21
- 0
Marlin/src/HAL/HAL_DUE/EepromEmulation.cpp ファイルの表示

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
1
 
22
 
2
 /* EEPROM emulation over flash with reduced wear
23
 /* EEPROM emulation over flash with reduced wear
3
  *
24
  *

+ 9
- 7
Marlin/src/gcode/calibrate/G425.cpp ファイルの表示

128
 #endif
128
 #endif
129
 
129
 
130
 inline bool read_calibration_pin() {
130
 inline bool read_calibration_pin() {
131
-  #if HAS_CALIBRATION_PIN
132
-    return (READ(CALIBRATION_PIN) != CALIBRATION_PIN_INVERTING);
133
-  #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
134
-    return (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
135
-  #else
136
-    return (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING);
137
-  #endif
131
+  return (
132
+    #if PIN_EXISTS(CALIBRATION)
133
+      READ(CALIBRATION_PIN) != CALIBRATION_PIN_INVERTING
134
+    #elif HAS_CUSTOM_PROBE_PIN
135
+      READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING
136
+    #else
137
+      READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING
138
+    #endif
139
+  );
138
 }
140
 }
139
 
141
 
140
 /**
142
 /**

+ 0
- 1
Marlin/src/inc/Conditionals_post.h ファイルの表示

1443
 #define HAS_Z4_MIN (PIN_EXISTS(Z4_MIN))
1443
 #define HAS_Z4_MIN (PIN_EXISTS(Z4_MIN))
1444
 #define HAS_Z4_MAX (PIN_EXISTS(Z4_MAX))
1444
 #define HAS_Z4_MAX (PIN_EXISTS(Z4_MAX))
1445
 #define HAS_Z_MIN_PROBE_PIN (HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE))
1445
 #define HAS_Z_MIN_PROBE_PIN (HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE))
1446
-#define HAS_CALIBRATION_PIN (PIN_EXISTS(CALIBRATION))
1447
 
1446
 
1448
 //
1447
 //
1449
 // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
1448
 // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)

+ 1
- 1
Marlin/src/lcd/language/language_tr.h ファイルの表示

1
- /**
1
+/**
2
  * Marlin 3D Printer Firmware
2
  * Marlin 3D Printer Firmware
3
  * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
  * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
  *
4
  *

+ 1
- 1
Marlin/src/module/endstops.cpp ファイルの表示

256
     #endif
256
     #endif
257
   #endif
257
   #endif
258
 
258
 
259
-  #if HAS_CALIBRATION_PIN
259
+  #if PIN_EXISTS(CALIBRATION)
260
     #if ENABLED(CALIBRATION_PIN_PULLUP)
260
     #if ENABLED(CALIBRATION_PIN_PULLUP)
261
       SET_INPUT_PULLUP(CALIBRATION_PIN);
261
       SET_INPUT_PULLUP(CALIBRATION_PIN);
262
     #elif ENABLED(CALIBRATION_PIN_PULLDOWN)
262
     #elif ENABLED(CALIBRATION_PIN_PULLDOWN)

+ 27
- 1
Marlin/src/pins/sam/pins_CNCONTROLS_15D.h ファイルの表示

1
 /**
1
 /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
2
  * CNControls V15 for HMS434 with DUE pin assignments
24
  * CNControls V15 for HMS434 with DUE pin assignments
3
  */
25
  */
4
 
26
 
92
 //#define PWM_2_PIN          13
114
 //#define PWM_2_PIN          13
93
 //#define SPARE_IO           17
115
 //#define SPARE_IO           17
94
 #define BEEPER_PIN         13
116
 #define BEEPER_PIN         13
95
-#define CALIBRATION_PIN    66
96
 #define STAT_LED_BLUE_PIN  -1
117
 #define STAT_LED_BLUE_PIN  -1
97
 #define STAT_LED_RED_PIN   31
118
 #define STAT_LED_RED_PIN   31
119
+
120
+// G425 CALIBRATION_GCODE default pin
121
+#ifndef CALIBRATION_PIN
122
+  #define CALIBRATION_PIN  66
123
+#endif

読み込み中…
キャンセル
保存