- gcode->stream->printf(";WCS settings\n");
- gcode->stream->printf("%s\n", wcs2gcode(current_wcs).c_str());
- int n = 1;
- for(auto &i : wcs_offsets) {
- if(i != wcs_t(0, 0, 0)) {
- float x, y, z;
- std::tie(x, y, z) = i;
- gcode->stream->printf("G10 L2 P%d X%f Y%f Z%f ; %s\n", n, x, y, z, wcs2gcode(n-1).c_str());
+ if(save_g54) {
+ gcode->stream->printf(";WCS settings\n");
+ gcode->stream->printf("%s\n", wcs2gcode(current_wcs).c_str());
+ int n = 1;
+ for(auto &i : wcs_offsets) {
+ if(i != wcs_t(0, 0, 0)) {
+ float x, y, z;
+ std::tie(x, y, z) = i;
+ gcode->stream->printf("G10 L2 P%d X%f Y%f Z%f ; %s\n", n, x, y, z, wcs2gcode(n-1).c_str());
+ }
+ ++n;