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] X_AXIS_TWIST_COMPENSATION settings are not saved in EEPROM #23744

Closed
Giuseppe499 opened this issue Feb 15, 2022 · 7 comments
Closed

[BUG] X_AXIS_TWIST_COMPENSATION settings are not saved in EEPROM #23744

Giuseppe499 opened this issue Feb 15, 2022 · 7 comments

Comments

@Giuseppe499
Copy link
Contributor

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

The settings of the feature X_AXIS_TWIST_COMPENSATION are not stored in EEPROM. When I use the X-Twist wizard, the correction values are computed, but if I save the settings to EEPROM and restart the printer the settings are not restored.

Bug Timeline

Marlin 2.0.9.3

Expected behavior

The settings for the feature X_AXIS_TWIST_COMPENSATION are restored after I save them and restart the printer

Actual behavior

When I use the X-Twist wizard, the correction values are computed, but if I save the settings to EEPROM and restart the printer the settings are not restored.

Steps to Reproduce

  1. Run the X-Twist Wizard
  2. Save Settings
  3. Restart printer
  4. Check if X_AXIS_TWIST_COMPENSATION settings are restored

Version of Marlin Firmware

Marlin 2.0.9.3

Printer model

Tronxy X8

Electronics

No response

Add-ons

BL Touch

Bed Leveling

ABL Bilinear mesh

Your Slicer

No response

Host Software

OctoPrint

Additional information & file uploads

Configurations.zip

@gordo3di
Copy link

Here's the code I used to save the x-twist values. I'm not sure if there is a better way to store the settings other than enqueuing M500 but it worked for me.

#23238 (comment)

@thisiskeithb
Copy link
Member

#23745 has been merged.

@Giuseppe499
Copy link
Contributor Author

Hi,

I tried the bugfix-2.0.x branch with X_AXIS_TWIST_COMPENSATION enabled on my TronxyX8, but it doesn't work.

After the merge of PR #23745, the printer always give me an EEPROM "Index Error" on startup. If I try to reset, save and load the settings I get the same EEPROM "Index Error".

I think that this problem is caused by the SettingsDataStruct being wrong in /Marlin/src/module/settings.cpp.
@thinkyhead made this change in the PR #23745:

  //
  // X_AXIS_TWIST_COMPENSATION
  //
  #if ENABLED(X_AXIS_TWIST_COMPENSATION)
-    float xatc_spacing, xatc_start;
-    xatc_array_t xatc_z_values; 
+    XATC xatc
  #endif

(Note: actually in the first commit of the PR the type xatc_array_t was named xatc_points_t)

If I revert this change, the problem is fixed.

I think that this problem should be fixed before closing this issue.

@thisiskeithb
Copy link
Member

Since that PR has already been merged, can you submit a new one with the fix...again?

@thisiskeithb
Copy link
Member

PR has been submitted: #23911

Thanks @ellensp!

@Giuseppe499
Copy link
Contributor Author

Since that PR has already been merged, can you submit a new one with the fix...again?

I was about to submit the PR but @ellensp was much faster than me 😂 .

Thanks @ellensp!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants