diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index c3cff3a..22f29ad 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,4 @@
+v1.0.169: Added Estimated Time to Serial Log on GCODE Load.
v1.0.168: Improved Grbl Flashing Tool and Moved to "Wizards and Tools", Improved Inch Mode 3D viewer, fix bug in Continious Jog
v1.0.167: Improved Memory management for 3D Viewer, Added Inch Mode (Issue#59), Moved Steps/mm Calibration Tools to "Wizards and Tools" menu,
v1.0.166: Fix for ElectronSecondInstance Behaviour and Updated SSL Certificates
diff --git a/app/js/main.js b/app/js/main.js
index 0996fd8..67c8be1 100644
--- a/app/js/main.js
+++ b/app/js/main.js
@@ -125,7 +125,7 @@ function loadFile(f) {
// gcode = this.result;
editor.session.setValue(this.result);
parseGcodeInWebWorker(this.result)
- printLog('GCODE Opened: ');
+ printLog('[ GCODE Parser ] GCODE File Loaded, please wait while we render a preview... ');
};
// }
}
diff --git a/app/lib/3dview/3dview.js b/app/lib/3dview/3dview.js
index f9fc494..0538b98 100644
--- a/app/lib/3dview/3dview.js
+++ b/app/lib/3dview/3dview.js
@@ -28,6 +28,30 @@ worker.addEventListener('message', function(e) {
clearSceneFlag = true;
resetView();
// animate();
+ var timeremain = object.userData.lines[object.userData.lines.length - 1].p2.timeMinsSum;
+
+ if (!isNaN(timeremain)) {
+ var mins_num = parseFloat(timeremain, 10); // don't forget the second param
+ var hours = Math.floor(mins_num / 60);
+ var minutes = Math.floor((mins_num - ((hours * 3600)) / 60));
+ var seconds = Math.floor((mins_num * 60) - (hours * 3600) - (minutes * 60));
+
+ // Appends 0 when unit is less than 10
+ if (hours < 10) {
+ hours = "0" + hours;
+ }
+ if (minutes < 10) {
+ minutes = "0" + minutes;
+ }
+ if (seconds < 10) {
+ seconds = "0" + seconds;
+ }
+ var formattedTime = hours + ':' + minutes + ':' + seconds;
+ console.log('Remaining time: ', formattedTime)
+ // output formattedTime to UI here
+ $('#timeRemaining').html(" / " + formattedTime);
+ printLog("[ GCODE Parser ] GCODE Preview Rendered Succesfully: Estimated GCODE Run Time: " + formattedTime + "")
+ }
}, 200);
$('#3dviewicon').removeClass('fa-pulse')
$('#3dviewlabel').html(' 3D View')
diff --git a/package.json b/package.json
index d8bc880..36cd93c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "OpenBuildsCONTROL",
- "version": "1.0.168",
+ "version": "1.0.169",
"license": "AGPL-3.0",
"description": "Machine Interface Driver for OpenBuilds",
"author": "github.com/openbuilds ",