Skip to content

Commit 0fca748

Browse files
committed
Fixed Runtime stats Error #22
1 parent 66d0acc commit 0fca748

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/views/providers/gcodeRuntimeParser.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class GCodeRuntimeParser {
106106

107107
// Feed Rate
108108
if (letter === 'E' || letter === 'F') {
109-
state.feedrate = +argument / 60.0; // Convert Per Min to Per Second
109+
state.feedrate = +argument;
110110
}
111111

112112
// Coords
@@ -184,9 +184,12 @@ export class GCodeRuntimeParser {
184184
ijkr.r = -1;
185185
}
186186

187+
// New Point -> Old Point
188+
Object.assign(oldpt, newpt);
189+
187190
if (!state.rapid) {
188-
// Calculate Time :: t = d / v
189-
state.rt += state.distance / state.feedrate;
191+
// Calculate Time :: t = d / v :: Convert Feedrate from IPM to Per Second
192+
state.rt += state.distance / (state.feedrate / 60);
190193
}
191194
}
192195
if (!isNaN(state.rt)) {

0 commit comments

Comments
 (0)