fix gcode api return path

This commit is contained in:
Stewart Allen 2020-11-09 08:50:03 -05:00
commit de26819d61
2 changed files with 8 additions and 3 deletions

View file

@ -2,7 +2,8 @@
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
* `F` implement an in-app bug reporting system
* `F` gcode generation progress bar
* `F` implement an in-app bug reporting system. add workspace to export option.
* `F` extend mesh object to store raw + annotations (rot,scale,pos)
* share raw data w/ dups, encode/decode
* `F` gcode color to speed visualization bar

View file

@ -40,12 +40,16 @@
}
}
function callExport(options, mode) {
function callExport(callback, mode) {
const gcode = [];
KIRI.client.export(API.conf.get(), (line) => {
gcode.push(line);
}, (output) => {
exportGCodeDialog(gcode.join('\n'), output);
if (callback) {
callback(gcode.join('\n'), output);
} else {
exportGCodeDialog(gcode.join('\n'), output);
}
});
}