fix calculated time output in cnc mode

This commit is contained in:
Stewart Allen 2024-07-04 10:27:59 -04:00
commit eb534a17ff

View file

@ -319,7 +319,7 @@ CAM.export = function(print, online) {
// update time calculation
time += opt.time >= 0 ? opt.time : (dist / (pos.f || 1000)) * 60;
consts.time = Math.round(time);
// if (comment && !stripComments) {
// nl.append(" ; ").append(comment);
// nl.append(" ; ").append(points);
@ -438,7 +438,7 @@ CAM.export = function(print, online) {
const newOp = newmode && !newmode.silent && mode !== newmode;
if (newOp) {
if (mode && !stripComments) {
append("; ending " + mode.type + " op after " + Math.round(time/60) + " seconds");
append("; ending " + mode.type + " op after " + Math.round(time) + " seconds");
}
mode = newmode;
if (mode) {
@ -465,7 +465,7 @@ CAM.export = function(print, online) {
}
if (mode && !stripComments) {
append("; ending " + mode.type + " op after " + Math.round(time/60) + " seconds");
append("; ending " + mode.type + " op after " + Math.round(time) + " seconds");
}
// emit gcode post