Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] /devel printer profile extruder 1 offset saving fails #728

Closed
derpicknicker1 opened this issue Jan 18, 2015 · 1 comment
Closed

[Bug] /devel printer profile extruder 1 offset saving fails #728

derpicknicker1 opened this issue Jan 18, 2015 · 1 comment

Comments

@derpicknicker1
Copy link
Contributor

Offstet settings for Extruder 1 will not be saved. To fix this issue modify two lines in static/js/app/viewmodels/printerprofiles.js.

Line 280 has to be removed so that offsets is an empty array. If not, extruder 1 offset will always have values 0,0 because it's the first element in Array.

            extruder: {
                count: parseInt(self.editorExtruders()),
                offsets: [],
                nozzleDiameter: parseFloat(self.editorNozzleDiameter())
            },

In Line 301 the for loop has to start with i = 0 to fatch all offset values (first array element ist numbered '0'). When starting with 1 you will fetch extruder 2 values first - or nothing when only one extruder is configured.

for (var i = 0; i < self.editorExtruders(); i++) {
    var offset = [0.0, 0.0];
    if (i < self.editorExtruderOffsets().length) {
        offset = [parseFloat(self.editorExtruderOffsets()[i]["x"]()), parseFloat(self.editorExtruderOffsets()[i]["y"]())];
    }
    profile.extruder.offsets.push(offset);
}

After modification everything works fine.

Version: 1.2.0-dev-405-gf52afb8-dirty (devel branch)

Printer: Replicape

Firmware: redeem

Terminal Log: N/A

octoprint.log: N/A

I love cookies!!!

@foosel
Copy link
Member

foosel commented Jan 18, 2015

Duplicate of #677

@foosel foosel closed this as completed Jan 18, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants