Skip to content

Commit 1d6403b

Browse files
author
KryQ
committed
dual stepper axis with squaring on home
rewritten whole thing from yesterday. added self squaring on homing. it's not pretty but it works. (i hope)
1 parent 9d2e64f commit 1d6403b

File tree

6 files changed

+236
-119
lines changed

6 files changed

+236
-119
lines changed

GRBL_Advanced.elay

+61-31
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,37 @@
2121
<Cursor1 position="1639" topLine="32" />
2222
</Cursor>
2323
</File>
24-
<File name="grbl\Config.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
24+
<File name="grbl\Config.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
2525
<Cursor>
26-
<Cursor1 position="31362" topLine="465" />
26+
<Cursor1 position="5999" topLine="569" />
2727
</Cursor>
2828
</File>
2929
<File name="grbl\CoolantControl.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
3030
<Cursor>
31-
<Cursor1 position="959" topLine="8" />
31+
<Cursor1 position="1339" topLine="44" />
3232
</Cursor>
3333
</File>
3434
<File name="grbl\CoolantControl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
3535
<Cursor>
36-
<Cursor1 position="873" topLine="13" />
36+
<Cursor1 position="873" topLine="5" />
3737
</Cursor>
3838
</File>
3939
<File name="grbl\defaults.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
4040
<Cursor>
41-
<Cursor1 position="2407" topLine="10" />
41+
<Cursor1 position="2407" topLine="30" />
4242
</Cursor>
4343
</File>
4444
<File name="grbl\GCode.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
4545
<Cursor>
46-
<Cursor1 position="2159" topLine="57" />
46+
<Cursor1 position="5734" topLine="157" />
4747
</Cursor>
48+
<Folding>
49+
<Collapse line="797" />
50+
</Folding>
4851
</File>
4952
<File name="grbl\GCode.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5053
<Cursor>
51-
<Cursor1 position="809" topLine="0" />
54+
<Cursor1 position="809" topLine="135" />
5255
</Cursor>
5356
</File>
5457
<File name="grbl\grbl_advance.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -63,25 +66,25 @@
6366
</File>
6467
<File name="grbl\Jog.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
6568
<Cursor>
66-
<Cursor1 position="752" topLine="4" />
69+
<Cursor1 position="752" topLine="0" />
6770
</Cursor>
6871
</File>
69-
<File name="grbl\Limits.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
72+
<File name="grbl\Limits.c" open="1" top="1" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
7073
<Cursor>
71-
<Cursor1 position="9413" topLine="275" />
74+
<Cursor1 position="5861" topLine="204" />
7275
</Cursor>
7376
<Folding>
74-
<Collapse line="234" />
77+
<Collapse line="60" />
7578
</Folding>
7679
</File>
7780
<File name="grbl\Limits.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
7881
<Cursor>
79-
<Cursor1 position="858" topLine="15" />
82+
<Cursor1 position="858" topLine="0" />
8083
</Cursor>
8184
</File>
82-
<File name="grbl\MotionControl.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
85+
<File name="grbl\MotionControl.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
8386
<Cursor>
84-
<Cursor1 position="14653" topLine="84" />
87+
<Cursor1 position="14793" topLine="98" />
8588
</Cursor>
8689
<Folding>
8790
<Collapse line="47" />
@@ -92,7 +95,7 @@
9295
</File>
9396
<File name="grbl\MotionControl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
9497
<Cursor>
95-
<Cursor1 position="848" topLine="3" />
98+
<Cursor1 position="1219" topLine="0" />
9699
</Cursor>
97100
</File>
98101
<File name="grbl\Planner.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -102,7 +105,7 @@
102105
</File>
103106
<File name="grbl\Planner.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
104107
<Cursor>
105-
<Cursor1 position="1896" topLine="15" />
108+
<Cursor1 position="1896" topLine="0" />
106109
</Cursor>
107110
</File>
108111
<File name="grbl\Probe.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -122,7 +125,7 @@
122125
</File>
123126
<File name="grbl\Protocol.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
124127
<Cursor>
125-
<Cursor1 position="842" topLine="3" />
128+
<Cursor1 position="842" topLine="0" />
126129
</Cursor>
127130
</File>
128131
<File name="grbl\Report.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -132,7 +135,7 @@
132135
</File>
133136
<File name="grbl\Report.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
134137
<Cursor>
135-
<Cursor1 position="1483" topLine="9" />
138+
<Cursor1 position="1483" topLine="27" />
136139
</Cursor>
137140
</File>
138141
<File name="grbl\Settings.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -142,7 +145,7 @@
142145
</File>
143146
<File name="grbl\Settings.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
144147
<Cursor>
145-
<Cursor1 position="3593" topLine="62" />
148+
<Cursor1 position="3593" topLine="44" />
146149
</Cursor>
147150
</File>
148151
<File name="grbl\SpindleControl.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -155,10 +158,28 @@
155158
<Cursor1 position="1411" topLine="12" />
156159
</Cursor>
157160
</File>
158-
<File name="grbl\Stepper.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
161+
<File name="grbl\Stepper.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
159162
<Cursor>
160-
<Cursor1 position="46208" topLine="307" />
163+
<Cursor1 position="19560" topLine="358" />
161164
</Cursor>
165+
<Folding>
166+
<Collapse line="253" />
167+
<Collapse line="336" />
168+
<Collapse line="352" />
169+
<Collapse line="369" />
170+
<Collapse line="483" />
171+
<Collapse line="493" />
172+
<Collapse line="510" />
173+
<Collapse line="527" />
174+
<Collapse line="543" />
175+
<Collapse line="548" />
176+
<Collapse line="567" />
177+
<Collapse line="610" />
178+
<Collapse line="630" />
179+
<Collapse line="675" />
180+
<Collapse line="686" />
181+
<Collapse line="751" />
182+
</Folding>
162183
</File>
163184
<File name="grbl\Stepper.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
164185
<Cursor>
@@ -172,7 +193,7 @@
172193
</File>
173194
<File name="grbl\System.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
174195
<Cursor>
175-
<Cursor1 position="4260" topLine="53" />
196+
<Cursor1 position="4260" topLine="18" />
176197
</Cursor>
177198
</File>
178199
<File name="grbl\ToolChange.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -187,7 +208,7 @@
187208
</File>
188209
<File name="grbl\util.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
189210
<Cursor>
190-
<Cursor1 position="1544" topLine="83" />
211+
<Cursor1 position="1087" topLine="11" />
191212
</Cursor>
192213
</File>
193214
<File name="HAL\EXTI\EXTI.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -207,17 +228,21 @@
207228
</File>
208229
<File name="HAL\FLASH\eeprom.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
209230
<Cursor>
210-
<Cursor1 position="1007" topLine="21" />
231+
<Cursor1 position="1007" topLine="2" />
211232
</Cursor>
212233
</File>
213-
<File name="HAL\GPIO\GPIO.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
234+
<File name="HAL\GPIO\GPIO.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
214235
<Cursor>
215-
<Cursor1 position="440" topLine="142" />
236+
<Cursor1 position="3693" topLine="77" />
216237
</Cursor>
238+
<Folding>
239+
<Collapse line="95" />
240+
<Collapse line="107" />
241+
</Folding>
217242
</File>
218-
<File name="HAL\GPIO\GPIO.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
243+
<File name="HAL\GPIO\GPIO.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
219244
<Cursor>
220-
<Cursor1 position="1808" topLine="38" />
245+
<Cursor1 position="1770" topLine="24" />
221246
</Cursor>
222247
</File>
223248
<File name="HAL\SPI\SPI.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -227,7 +252,7 @@
227252
</File>
228253
<File name="HAL\SPI\SPI.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
229254
<Cursor>
230-
<Cursor1 position="638" topLine="0" />
255+
<Cursor1 position="638" topLine="17" />
231256
</Cursor>
232257
</File>
233258
<File name="HAL\STM32\startup_stm32f4xx.S" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -315,11 +340,16 @@
315340
<Collapse line="169" />
316341
</Folding>
317342
</File>
318-
<File name="main.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
343+
<File name="main.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
319344
<Cursor>
320345
<Cursor1 position="3574" topLine="83" />
321346
</Cursor>
322347
</File>
348+
<File name="SPL\inc\misc.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
349+
<Cursor>
350+
<Cursor1 position="0" topLine="131" />
351+
</Cursor>
352+
</File>
323353
<File name="SPL\inc\stm32f4xx_cryp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
324354
<Cursor>
325355
<Cursor1 position="539" topLine="27" />
@@ -332,7 +362,7 @@
332362
</File>
333363
<File name="SPL\inc\stm32f4xx_gpio.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
334364
<Cursor>
335-
<Cursor1 position="5227" topLine="134" />
365+
<Cursor1 position="5227" topLine="329" />
336366
</Cursor>
337367
</File>
338368
<File name="SPL\inc\stm32f4xx_rcc.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">

grbl/Config.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
114114
// will not be affected by pin sharing.
115115
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
116-
#define HOMING_CYCLE_0 (1<<Z_AXIS) // REQUIRED: First move Z to clear workspace.
117-
#define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS)) // OPTIONAL: Then move X,Y at the same time.
116+
//#define HOMING_CYCLE_0 (1<<Z_AXIS) // REQUIRED: First move Z to clear workspace.
117+
#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS)) // OPTIONAL: Then move X,Y at the same time.
118118
// #define HOMING_CYCLE_2 // OPTIONAL: Uncomment and add axes mask to enable
119119

120120
// NOTE: The following are two examples to setup homing for 2-axis machines.

0 commit comments

Comments
 (0)