kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
rodzic
c265ad5155
commit
fd9cb1182a
|
@ -1,3 +1,4 @@
|
||||||
|
v1.0.173: Added support (beta) for G2/3 to the Simulator
|
||||||
v1.0.172: Fix spelling error (US vs UK English)
|
v1.0.172: Fix spelling error (US vs UK English)
|
||||||
v1.0.171: Fix Keyboard-Jog Default Assignment bug
|
v1.0.171: Fix Keyboard-Jog Default Assignment bug
|
||||||
v1.0.170: MacOS: Fixes: Top Menu, Copy/Paste, Label for Port Name (remove /dev/tty to keep smaller)
|
v1.0.170: MacOS: Fixes: Top Menu, Copy/Paste, Label for Port Name (remove /dev/tty to keep smaller)
|
||||||
|
|
|
@ -4,32 +4,32 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkUpdate() {
|
function checkUpdate() {
|
||||||
if (!isMac && webgl) {
|
// if (!isMac && webgl) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// console.log('checking for update')
|
// console.log('checking for update')
|
||||||
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>Checking for Updates</span>")
|
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>Checking for Updates</span>")
|
||||||
$.getJSON("https://api.github.com/repos/OpenBuilds/OpenBuilds-CONTROL/releases/latest?client_id=fbbb80debc1197222169&client_secret=7dc6e463422e933448f9a3a4150c8d2bbdd0f87c").done(function(release) {
|
$.getJSON("https://api.github.com/repos/OpenBuilds/OpenBuilds-CONTROL/releases/latest?client_id=fbbb80debc1197222169&client_secret=7dc6e463422e933448f9a3a4150c8d2bbdd0f87c").done(function(release) {
|
||||||
var availVersion = release.name.substr(1)
|
var availVersion = release.name.substr(1)
|
||||||
var currentVersion = laststatus.driver.version
|
var currentVersion = laststatus.driver.version
|
||||||
// console.log(versionCompare(availVersion, currentVersion), availVersion, currentVersion);
|
// console.log(versionCompare(availVersion, currentVersion), availVersion, currentVersion);
|
||||||
if (versionCompare(availVersion, currentVersion) == 1) {
|
if (versionCompare(availVersion, currentVersion) == 1) {
|
||||||
console.log('outdated')
|
console.log('outdated')
|
||||||
time = 10
|
time = 10
|
||||||
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>OpenBuilds CONTROL <code>" + availVersion + "</code>. is available now.</span>")
|
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>OpenBuilds CONTROL <code>" + availVersion + "</code>. is available now.</span>")
|
||||||
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>Download will start in <span class='tally' id='countdown'>10</span> seconds (<a href='#' onclick='cancelTimer();'>cancel</a>) </span>")
|
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>Download will start in <span class='tally' id='countdown'>10</span> seconds (<a href='#' onclick='cancelTimer();'>cancel</a>) </span>")
|
||||||
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>You will be prompted when its ready to be installed </span>")
|
printLog("<span class='fg-red'>[ Update Available! ] </span><span class='fg-green'>You will be prompted when its ready to be installed </span>")
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateTime();
|
updateTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>You are already running OpenBuilds CONTROL " + currentVersion + "</span>")
|
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>You are already running OpenBuilds CONTROL " + currentVersion + "</span>")
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
checkUpdate()
|
checkUpdate()
|
||||||
}, 15 * 60 * 1000) // 15 mins
|
}, 15 * 60 * 1000) // 15 mins
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ function sim(startindex) {
|
||||||
// timefactor = 1;
|
// timefactor = 1;
|
||||||
$('#simspeedval').text(timefactor);
|
$('#simspeedval').text(timefactor);
|
||||||
var simIdx = startindex;
|
var simIdx = startindex;
|
||||||
|
var arcIdx = 0;
|
||||||
$('#simstartbtn').attr('disabled', true);
|
$('#simstartbtn').attr('disabled', true);
|
||||||
$('#simstopbtn').attr('disabled', false);
|
$('#simstopbtn').attr('disabled', false);
|
||||||
$('#editorContextMenu').hide() // sometimes we launch sim(linenum) from the context menu... close it once running
|
$('#editorContextMenu').hide() // sometimes we launch sim(linenum) from the context menu... close it once running
|
||||||
|
@ -133,13 +134,24 @@ function runSim() {
|
||||||
// $('#simgcode').html(object.userData.lines[simIdx].args.origtext);
|
// $('#simgcode').html(object.userData.lines[simIdx].args.origtext);
|
||||||
|
|
||||||
if (object.userData.lines[simIdx].p2.arc) {
|
if (object.userData.lines[simIdx].p2.arc) {
|
||||||
console.log(object.userData.lines[simIdx])
|
//console.log(object.userData.lines[simIdx])
|
||||||
|
// not running arcs yet!
|
||||||
|
arcIdx = 0;
|
||||||
|
runSimArc()
|
||||||
|
// lets move on
|
||||||
|
// simIdx++;
|
||||||
|
// if (simIdx < object.userData.lines.length) {
|
||||||
|
// runSim();
|
||||||
|
// } else {
|
||||||
|
// simstop();
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var posx = object.userData.lines[simIdx].p2.x; //- (sizexmax/2);
|
var posx = object.userData.lines[simIdx].p2.x; //- (sizexmax/2);
|
||||||
var posy = object.userData.lines[simIdx].p2.y; //- (sizeymax/2);
|
var posy = object.userData.lines[simIdx].p2.y; //- (sizeymax/2);
|
||||||
var posz = object.userData.lines[simIdx].p2.z;
|
var posz = object.userData.lines[simIdx].p2.z;
|
||||||
|
|
||||||
|
//console.log(posx, posy, posz, object.userData.lines[simIdx])
|
||||||
|
|
||||||
if (object.userData.lines[simIdx].args.isFake) {
|
if (object.userData.lines[simIdx].args.isFake) {
|
||||||
if (object.userData.lines[simIdx].args.text.length < 1) {
|
if (object.userData.lines[simIdx].args.text.length < 1) {
|
||||||
var text = "empty line"
|
var text = "empty line"
|
||||||
|
@ -219,13 +231,16 @@ function runSim() {
|
||||||
};
|
};
|
||||||
|
|
||||||
function runSimArc() {
|
function runSimArc() {
|
||||||
|
|
||||||
|
//var object = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx]
|
||||||
|
|
||||||
// editor.gotoLine(simIdx + 1)
|
// editor.gotoLine(simIdx + 1)
|
||||||
$('#gcodesent').html(simIdx + 1);
|
$('#gcodesent').html(simIdx + 1);
|
||||||
// $('#simgcode').html(object.userData.lines[simIdx].args.origtext);
|
// $('#simgcode').html(object.userData.lines[simIdx].args.origtext);
|
||||||
var posx = object.userData.lines[simIdx].p2.x; //- (sizexmax/2);
|
var posx = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx].x; //- (sizexmax/2);
|
||||||
var posy = object.userData.lines[simIdx].p2.y; //- (sizeymax/2);
|
var posy = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx].y; //- (sizeymax/2);
|
||||||
var posz = object.userData.lines[simIdx].p2.z;
|
var posz = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx].z;
|
||||||
|
console.log(posx, posy, posz)
|
||||||
if (object.userData.lines[simIdx].args.isFake) {
|
if (object.userData.lines[simIdx].args.isFake) {
|
||||||
if (object.userData.lines[simIdx].args.text.length < 1) {
|
if (object.userData.lines[simIdx].args.text.length < 1) {
|
||||||
var text = "empty line"
|
var text = "empty line"
|
||||||
|
@ -235,7 +250,7 @@ function runSimArc() {
|
||||||
var simTime = 0.01 / timefactor;
|
var simTime = 0.01 / timefactor;
|
||||||
} else {
|
} else {
|
||||||
var text = object.userData.lines[simIdx].args.cmd
|
var text = object.userData.lines[simIdx].args.cmd
|
||||||
var simTime = object.userData.lines[simIdx].p2.timeMins / timefactor;
|
var simTime = (object.userData.lines[simIdx].p2.timeMins / timefactor) / object.userData.lines[simIdx].p2.threeObjArc.object.userData.points.length;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (object.userData.lines[simIdx].p2.feedrate == null) {
|
if (object.userData.lines[simIdx].p2.feedrate == null) {
|
||||||
|
@ -265,6 +280,7 @@ function runSimArc() {
|
||||||
`);
|
`);
|
||||||
var simTimeInSec = simTime * 60;
|
var simTimeInSec = simTime * 60;
|
||||||
// console.log(simTimeInSec)
|
// console.log(simTimeInSec)
|
||||||
|
|
||||||
if (!object.userData.lines[simIdx].args.isFake) {
|
if (!object.userData.lines[simIdx].args.isFake) {
|
||||||
TweenMax.to(cone.position, simTimeInSec, {
|
TweenMax.to(cone.position, simTimeInSec, {
|
||||||
x: posx,
|
x: posx,
|
||||||
|
@ -275,11 +291,12 @@ function runSimArc() {
|
||||||
//return
|
//return
|
||||||
simstop();
|
simstop();
|
||||||
} else {
|
} else {
|
||||||
simIdx++;
|
arcIdx++;
|
||||||
if (simIdx < object.userData.lines.length) {
|
if (simIdx < object.userData.lines[simIdx].p2.threeObjArc.object.userData.points.length) {
|
||||||
runSim();
|
runSimArc();
|
||||||
} else {
|
} else {
|
||||||
simstop();
|
simIdx++;
|
||||||
|
runSim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -429,13 +429,20 @@ GCodeParser = function(handlers, modecmdhandlers) {
|
||||||
var acgeo = new THREE.Geometry();
|
var acgeo = new THREE.Geometry();
|
||||||
var ctr = 0;
|
var ctr = 0;
|
||||||
var z = aZ;
|
var z = aZ;
|
||||||
|
var points = []
|
||||||
ac.getPoints(20).forEach(function(v) {
|
ac.getPoints(20).forEach(function(v) {
|
||||||
//console.log(v);
|
//console.log(v);
|
||||||
z = (((endaZ - aZ) / 20) * ctr) + aZ;
|
z = (((endaZ - aZ) / 20) * ctr) + aZ;
|
||||||
acgeo.vertices.push(new THREE.Vector3(v.x, v.y, z));
|
acgeo.vertices.push(new THREE.Vector3(v.x, v.y, z));
|
||||||
ctr++;
|
ctr++;
|
||||||
|
points.push({
|
||||||
|
'x': v.x,
|
||||||
|
'y': v.y,
|
||||||
|
'z': z,
|
||||||
|
})
|
||||||
});
|
});
|
||||||
var aco = new THREE.Line(acgeo, acmat);
|
var aco = new THREE.Line(acgeo, acmat);
|
||||||
|
aco.userData.points = points;
|
||||||
//aco.position.set(pArc.x, pArc.y, pArc.z);
|
//aco.position.set(pArc.x, pArc.y, pArc.z);
|
||||||
//console.log("aco:", aco);
|
//console.log("aco:", aco);
|
||||||
this.extraObjects[plane].push(aco);
|
this.extraObjects[plane].push(aco);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "OpenBuildsCONTROL",
|
"name": "OpenBuildsCONTROL",
|
||||||
"version": "1.0.172",
|
"version": "1.0.173",
|
||||||
"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