add print time and material to N2 profile

This commit is contained in:
Stewart Allen 2017-12-22 09:41:38 -05:00
commit 2b53921744
2 changed files with 9 additions and 2 deletions

View file

@ -500,11 +500,15 @@ var gs_kiri_fdm = exports;
layer++; layer++;
} }
consts.material = UTIL.round(emitted,2);
consts.time = UTIL.round(time,2);
append("; --- shutdown ---"); append("; --- shutdown ---");
for (var i=0; i<device.gcodePost.length; i++) { for (var i=0; i<device.gcodePost.length; i++) {
append(constReplace(device.gcodePost[i], consts)); append(constReplace(device.gcodePost[i], consts));
} }
append("; --- filament used: "+UTIL.round(emitted,decimals)+"mm ---"); append("; --- filament used: " +consts.material + "mm ---");
append("; --- print time: " + consts.time + "s ---");
// force emit of buffer // force emit of buffer
append(); append();

View file

@ -30,7 +30,10 @@
"M140 S0", "M140 S0",
"G1 X20 Y20 F6000", "G1 X20 Y20 F6000",
"G1 X0 Y0", "G1 X0 Y0",
"M84" "M84",
";Print Time: {time}",
";Material#1 Used: {material}",
";Material#2 Used: 0.0"
], ],
"cmd":{ "cmd":{
"fan_power": "M106 S{fan_speed}" "fan_power": "M106 S{fan_speed}"