Skip to content

Commit 5028693

Browse files
committed
Leave G21 for a future PR
1 parent ba0e8c4 commit 5028693

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

src/__tests__/interpreter.ts

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

183-
test('.G21 sets the units to millimeters', () => {
184-
const command = new GCodeCommand('G21', 'g21', {});
185-
const interpreter = new Interpreter();
186-
const job = new Job();
187-
188-
interpreter.G21(command, job);
189-
190-
expect(job.state.units).toEqual('mm');
191-
});
192-
193183
test('.g28 moves the state to the origin', () => {
194184
const command = new GCodeCommand('G28', 'g28', {});
195185
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-
G21 = 'G21',
6665
G28 = 'G28',
6766
T0 = 'T0',
6867
T1 = 'T1',
@@ -100,8 +99,6 @@ export class GCodeCommand {
10099
return Code.G3;
101100
case 'g20':
102101
return Code.G20;
103-
case 'g21':
104-
return Code.G21;
105102
case 'g28':
106103
return Code.G28;
107104
case 't0':

src/interpreter.ts

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

137-
G21(command: GCodeCommand, job: Job): void {
138-
job.state.units = 'mm';
139-
}
140-
141137
G28(command: GCodeCommand, job: Job): void {
142138
job.state.x = 0;
143139
job.state.y = 0;

0 commit comments

Comments
 (0)