seed profiles from new device when provided
This commit is contained in:
parent
d69ccb74f0
commit
08880e6044
3 changed files with 70 additions and 2 deletions
|
|
@ -57,5 +57,55 @@
|
|||
"bed_width": 200,
|
||||
"bed_depth": 300,
|
||||
"build_height": 170
|
||||
}
|
||||
},
|
||||
"profiles":[{
|
||||
"processName": "CR30",
|
||||
"sliceHeight": 0.25,
|
||||
"sliceShells": 3,
|
||||
"sliceShellOrder": "in-out",
|
||||
"sliceLayerStart": "last",
|
||||
"sliceFillAngle": 45,
|
||||
"sliceFillOverlap": 0.3,
|
||||
"sliceFillSparse": 0.2,
|
||||
"sliceFillType": "hex",
|
||||
"sliceSupportDensity": 0.25,
|
||||
"sliceSupportOffset": 1.0,
|
||||
"sliceSupportGap": 0.75,
|
||||
"sliceSupportSize": 5,
|
||||
"sliceSupportArea": 0.1,
|
||||
"sliceSupportExtra": 0,
|
||||
"sliceSupportAngle": 50,
|
||||
"sliceSupportNozzle": 0,
|
||||
"sliceSolidMinArea": 1,
|
||||
"sliceSolidLayers": 3,
|
||||
"sliceBottomLayers": 3,
|
||||
"sliceTopLayers": 3,
|
||||
"firstLayerRate": 20,
|
||||
"firstLayerPrintMult": 1.1,
|
||||
"firstLayerYOffset": 0,
|
||||
"firstLayerBrim": 0,
|
||||
"outputTemp": 210,
|
||||
"outputFanMax": 255,
|
||||
"outputBedTemp": 60,
|
||||
"outputFeedrate": 50,
|
||||
"outputFinishrate": 50,
|
||||
"outputSeekrate": 80,
|
||||
"outputShellMult": 1.25,
|
||||
"outputFillMult": 1.25,
|
||||
"outputSparseMult": 1.25,
|
||||
"outputFanLayer": 1,
|
||||
"outputRetractDist": 3,
|
||||
"outputRetractSpeed": 40,
|
||||
"outputRetractDwell": 30,
|
||||
"outputShortPoly": 100.0,
|
||||
"outputMinSpeed": 10.0,
|
||||
"outputCoastDist": 0,
|
||||
"outputWipeDistance": 0,
|
||||
"outputLayerRetract": false,
|
||||
"detectThinWalls": true,
|
||||
"sliceMinHeight": 0,
|
||||
"sliceAdaptive": false,
|
||||
"zHopDistance": 0.2,
|
||||
"antiBacklash": 0
|
||||
}]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -698,6 +698,24 @@
|
|||
dev = current.device = CONF.device_from_code(code,mode),
|
||||
proc = current.process;
|
||||
|
||||
// first time device use, add any print profiles and set to default if present
|
||||
if (dproc === undefined) {
|
||||
console.log('new device', code);
|
||||
if (code.profiles) {
|
||||
for (let profile of code.profiles) {
|
||||
let profname = profile.processName;
|
||||
if (!current.sproc[mode][profname]) {
|
||||
console.log('adding profile', profname, 'to', mode);
|
||||
current.sproc[mode][profname] = profile;
|
||||
}
|
||||
if (!current.devproc[devicename]) {
|
||||
console.log('setting default profile for new device', devicename, 'to', profname);
|
||||
current.devproc[devicename] = dproc = profname;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dev.new = false;
|
||||
dev.deviceName = devicename;
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ kiri.lang['en-us'] = {
|
|||
|
||||
// SETTINGS
|
||||
se_menu: "profile",
|
||||
se_load: "open",
|
||||
se_load: "load",
|
||||
se_save: "save",
|
||||
|
||||
// FDM SLICING
|
||||
|
|
|
|||
Loading…
Reference in a new issue