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] HAS_LINEAR_E_JERK / CLASSIC_JERK discrepancy #27418

Open
1 task done
classicrocker883 opened this issue Sep 12, 2024 · 0 comments
Open
1 task done

[BUG] HAS_LINEAR_E_JERK / CLASSIC_JERK discrepancy #27418

classicrocker883 opened this issue Sep 12, 2024 · 0 comments

Comments

@classicrocker883
Copy link
Contributor

classicrocker883 commented Sep 12, 2024

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

Yes, and the problem still exists.

Bug Description

There is an impossibility here, if CLASSIC_JERK is enabled, then HAS_LINEAR_E_JERK cannot be defined, yet in settings.cpp, we have that case.

In Conditionals-4-adv.h,

// Use Junction Deviation for motion if Jerk is disabled
#if DISABLED(CLASSIC_JERK)
  #define HAS_JUNCTION_DEVIATION 1
#endif
[...]
// Linear advance uses Jerk since E is an isolated axis
#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
  #define HAS_LINEAR_E_JERK 1
#endif

settings.cpp

      #if ENABLED(CLASSIC_JERK)
        EEPROM_WRITE(planner.max_jerk);
        #if HAS_LINEAR_E_JERK
          dummyf = float(DEFAULT_EJERK);
          EEPROM_WRITE(dummyf);
        #endif
      #else
        const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(5, 10, 10, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4);
        EEPROM_WRITE(planner_max_jerk);
      #endif
[...]
        #if ENABLED(CLASSIC_JERK)
          EEPROM_READ(planner.max_jerk);
          #if HAS_LINEAR_E_JERK
            EEPROM_READ(dummyf);
          #endif
        #else
          for (uint8_t q = LOGICAL_AXES; q--;) EEPROM_READ(dummyf);
        #endif

Bug Timeline

possibly old as dinosaurs

Expected behavior

Not sure which comes which, but HAS_LINEAR_E_JERK either can be defined when CLASSIC_JERK is either enabled or disabled

perhaps move this outside CLASSIC_JERK being enabled

       #if HAS_LINEAR_E_JERK
          dummyf = float(DEFAULT_EJERK);
          EEPROM_WRITE(dummyf);
        #endif
[...]
          #if HAS_LINEAR_E_JERK
            EEPROM_READ(dummyf);
          #endif

or change

-#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
  #define HAS_LINEAR_E_JERK 1
#endif

+#if ANY(HAS_JUNCTION_DEVIATION, CLASSIC_JERK) && ENABLED(LIN_ADVANCE)
  #define HAS_LINEAR_E_JERK 1
#endif

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

bugfix-2.1.x

Printer model

No response

Electronics

No response

LCD/Controller

No response

Other add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant