add alert on suspect support angle for non-belt. correct dwell time calcs
This commit is contained in:
parent
98a24c2792
commit
3c7dea3626
3 changed files with 18 additions and 5 deletions
|
|
@ -328,7 +328,7 @@
|
|||
split: groupSplit,
|
||||
},
|
||||
hide: {
|
||||
alert: function(rec) { alert2cancel(rec) },
|
||||
alert: function(rec,recs) { alert2cancel(rec,recs) },
|
||||
import: function() { },
|
||||
slider: hideSlider
|
||||
},
|
||||
|
|
@ -602,7 +602,13 @@
|
|||
return rec;
|
||||
}
|
||||
|
||||
function alert2cancel(rec) {
|
||||
function alert2cancel(rec,recs) {
|
||||
if (Array.isArray(recs)) {
|
||||
for (let r of recs) {
|
||||
alert2cancel(r);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (feature.alert_event) {
|
||||
API.event.emit('alert.cancel', rec);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -213,10 +213,17 @@
|
|||
}
|
||||
});
|
||||
api.event.on("fdm.supports.detect", func.sgen = () => {
|
||||
alert = api.show.alert("analyzing part(s)...", 1000);
|
||||
let alerts = [];
|
||||
let { process, device } = api.conf.get();
|
||||
if (!device.bedBelt) {
|
||||
if (process.sliceSupportAngle < 10) {
|
||||
alerts.push(api.show.alert("angles below 10 degrees may fail"));
|
||||
}
|
||||
}
|
||||
alerts.push(api.show.alert("analyzing part(s)...", 1000));
|
||||
FDM.support_generate(array => {
|
||||
func.sclear();
|
||||
api.hide.alert(alert);
|
||||
api.hide.alert(undefined,alerts);
|
||||
for (let rec of array) {
|
||||
let { widget, supports } = rec;
|
||||
let wa = API.widgets.annotate(widget.id);
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@
|
|||
}
|
||||
|
||||
function dwell(ms) {
|
||||
time += ms;
|
||||
time += ms/1000;
|
||||
// break up dwell times over 4s because of
|
||||
// limitations in some firmwares
|
||||
while (ms > 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue