Skip to content

Commit bcf7682

Browse files
committed
Keep G28 for a separate PR
1 parent ac93091 commit bcf7682

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

src/__tests__/interpreter.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,6 @@ test('.G20 sets the units to inches', () => {
180180
expect(job.state.units).toEqual('in');
181181
});
182182

183-
test('.g28 moves the state to the origin', () => {
184-
const command = new GCodeCommand('G28', 'g28', {});
185-
const interpreter = new Interpreter();
186-
const job = new Job();
187-
job.state.x = 3;
188-
job.state.y = 4;
189-
190-
interpreter.G28(command, job);
191-
192-
expect(job.state.x).toEqual(0);
193-
expect(job.state.y).toEqual(0);
194-
expect(job.state.z).toEqual(0);
195-
});
196-
197183
test('.t0 sets the tool to 0', () => {
198184
const command = new GCodeCommand('T0', 't0', {});
199185
const interpreter = new Interpreter();

src/gcode-parser.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export enum Code {
6262
G2 = 'G2',
6363
G3 = 'G3',
6464
G20 = 'G20',
65-
G28 = 'G28',
6665
T0 = 'T0',
6766
T1 = 'T1',
6867
T2 = 'T2',
@@ -99,8 +98,6 @@ export class GCodeCommand {
9998
return Code.G3;
10099
case 'g20':
101100
return Code.G20;
102-
case 'g28':
103-
return Code.G28;
104101
case 't0':
105102
return Code.T0;
106103
case 't1':

src/interpreter.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,6 @@ export class Interpreter {
134134
job.state.units = 'in';
135135
}
136136

137-
G28(command: GCodeCommand, job: Job): void {
138-
job.state.x = 0;
139-
job.state.y = 0;
140-
job.state.z = 0;
141-
}
142-
143137
T0(command: GCodeCommand, job: Job): void {
144138
job.state.tool = 0;
145139
}

0 commit comments

Comments
 (0)