kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
Est Time Remaining added
rodzic
b06749c4ce
commit
6e5361264d
|
@ -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.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.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
|
v1.0.166: Fix for ElectronSecondInstance Behaviour and Updated SSL Certificates
|
||||||
|
|
|
@ -125,7 +125,7 @@ function loadFile(f) {
|
||||||
// gcode = this.result;
|
// gcode = this.result;
|
||||||
editor.session.setValue(this.result);
|
editor.session.setValue(this.result);
|
||||||
parseGcodeInWebWorker(this.result)
|
parseGcodeInWebWorker(this.result)
|
||||||
printLog('GCODE Opened: ');
|
printLog('<span class="fg-red">[ GCODE Parser ]</span><span class="fg-green"> GCODE File Loaded, please wait while we render a preview... </span>');
|
||||||
};
|
};
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,30 @@ worker.addEventListener('message', function(e) {
|
||||||
clearSceneFlag = true;
|
clearSceneFlag = true;
|
||||||
resetView();
|
resetView();
|
||||||
// animate();
|
// 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("<span class='fg-red'>[ GCODE Parser ]</span><span class='fg-green'> GCODE Preview Rendered Succesfully: Estimated GCODE Run Time: </span><span class='badge inline bg-darkGreen fg-white'>" + formattedTime + "</span>")
|
||||||
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
$('#3dviewicon').removeClass('fa-pulse')
|
$('#3dviewicon').removeClass('fa-pulse')
|
||||||
$('#3dviewlabel').html(' 3D View')
|
$('#3dviewlabel').html(' 3D View')
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "OpenBuildsCONTROL",
|
"name": "OpenBuildsCONTROL",
|
||||||
"version": "1.0.168",
|
"version": "1.0.169",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"description": "Machine Interface Driver for OpenBuilds",
|
"description": "Machine Interface Driver for OpenBuilds",
|
||||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||||
|
|
Ładowanie…
Reference in New Issue