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.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)
|
||||
|
|
|
@ -4,32 +4,32 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
function checkUpdate() {
|
||||
if (!isMac && webgl) {
|
||||
setTimeout(function() {
|
||||
// console.log('checking for update')
|
||||
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) {
|
||||
var availVersion = release.name.substr(1)
|
||||
var currentVersion = laststatus.driver.version
|
||||
// console.log(versionCompare(availVersion, currentVersion), availVersion, currentVersion);
|
||||
if (versionCompare(availVersion, currentVersion) == 1) {
|
||||
console.log('outdated')
|
||||
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'>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>")
|
||||
setTimeout(function() {
|
||||
updateTime();
|
||||
}, 1000);
|
||||
} else {
|
||||
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>You are already running OpenBuilds CONTROL " + currentVersion + "</span>")
|
||||
setTimeout(function() {
|
||||
checkUpdate()
|
||||
}, 15 * 60 * 1000) // 15 mins
|
||||
}
|
||||
});
|
||||
}, 1000)
|
||||
}
|
||||
// if (!isMac && webgl) {
|
||||
setTimeout(function() {
|
||||
// console.log('checking for update')
|
||||
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) {
|
||||
var availVersion = release.name.substr(1)
|
||||
var currentVersion = laststatus.driver.version
|
||||
// console.log(versionCompare(availVersion, currentVersion), availVersion, currentVersion);
|
||||
if (versionCompare(availVersion, currentVersion) == 1) {
|
||||
console.log('outdated')
|
||||
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'>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>")
|
||||
setTimeout(function() {
|
||||
updateTime();
|
||||
}, 1000);
|
||||
} else {
|
||||
printLog("<span class='fg-red'>[ update ] </span><span class='fg-green'>You are already running OpenBuilds CONTROL " + currentVersion + "</span>")
|
||||
setTimeout(function() {
|
||||
checkUpdate()
|
||||
}, 15 * 60 * 1000) // 15 mins
|
||||
}
|
||||
});
|
||||
}, 1000)
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ function sim(startindex) {
|
|||
// timefactor = 1;
|
||||
$('#simspeedval').text(timefactor);
|
||||
var simIdx = startindex;
|
||||
var arcIdx = 0;
|
||||
$('#simstartbtn').attr('disabled', true);
|
||||
$('#simstopbtn').attr('disabled', false);
|
||||
$('#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);
|
||||
|
||||
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 {
|
||||
|
||||
var posx = object.userData.lines[simIdx].p2.x; //- (sizexmax/2);
|
||||
var posy = object.userData.lines[simIdx].p2.y; //- (sizeymax/2);
|
||||
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.text.length < 1) {
|
||||
var text = "empty line"
|
||||
|
@ -219,13 +231,16 @@ function runSim() {
|
|||
};
|
||||
|
||||
function runSimArc() {
|
||||
|
||||
//var object = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx]
|
||||
|
||||
// editor.gotoLine(simIdx + 1)
|
||||
$('#gcodesent').html(simIdx + 1);
|
||||
// $('#simgcode').html(object.userData.lines[simIdx].args.origtext);
|
||||
var posx = object.userData.lines[simIdx].p2.x; //- (sizexmax/2);
|
||||
var posy = object.userData.lines[simIdx].p2.y; //- (sizeymax/2);
|
||||
var posz = object.userData.lines[simIdx].p2.z;
|
||||
|
||||
var posx = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx].x; //- (sizexmax/2);
|
||||
var posy = object.userData.lines[simIdx].p2.threeObjArc.object.userData.points[arcIdx].y; //- (sizeymax/2);
|
||||
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.text.length < 1) {
|
||||
var text = "empty line"
|
||||
|
@ -235,7 +250,7 @@ function runSimArc() {
|
|||
var simTime = 0.01 / timefactor;
|
||||
} else {
|
||||
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) {
|
||||
|
@ -265,6 +280,7 @@ function runSimArc() {
|
|||
`);
|
||||
var simTimeInSec = simTime * 60;
|
||||
// console.log(simTimeInSec)
|
||||
|
||||
if (!object.userData.lines[simIdx].args.isFake) {
|
||||
TweenMax.to(cone.position, simTimeInSec, {
|
||||
x: posx,
|
||||
|
@ -275,11 +291,12 @@ function runSimArc() {
|
|||
//return
|
||||
simstop();
|
||||
} else {
|
||||
simIdx++;
|
||||
if (simIdx < object.userData.lines.length) {
|
||||
runSim();
|
||||
arcIdx++;
|
||||
if (simIdx < object.userData.lines[simIdx].p2.threeObjArc.object.userData.points.length) {
|
||||
runSimArc();
|
||||
} else {
|
||||
simstop();
|
||||
simIdx++;
|
||||
runSim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -429,13 +429,20 @@ GCodeParser = function(handlers, modecmdhandlers) {
|
|||
var acgeo = new THREE.Geometry();
|
||||
var ctr = 0;
|
||||
var z = aZ;
|
||||
var points = []
|
||||
ac.getPoints(20).forEach(function(v) {
|
||||
//console.log(v);
|
||||
z = (((endaZ - aZ) / 20) * ctr) + aZ;
|
||||
acgeo.vertices.push(new THREE.Vector3(v.x, v.y, z));
|
||||
ctr++;
|
||||
points.push({
|
||||
'x': v.x,
|
||||
'y': v.y,
|
||||
'z': z,
|
||||
})
|
||||
});
|
||||
var aco = new THREE.Line(acgeo, acmat);
|
||||
aco.userData.points = points;
|
||||
//aco.position.set(pArc.x, pArc.y, pArc.z);
|
||||
//console.log("aco:", aco);
|
||||
this.extraObjects[plane].push(aco);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.172",
|
||||
"version": "1.0.173",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "Machine Interface Driver for OpenBuilds",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue