add alert on suspect support angle for non-belt. correct dwell time calcs

This commit is contained in:
Stewart Allen 2021-11-29 19:39:40 -05:00
commit 3c7dea3626
3 changed files with 18 additions and 5 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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) {