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] Enabling I_AXIS (as alternative to E_AXIS on MiniRambo board) fails compiling caused by missing I_MS3_PIN. #26889

Closed
1 task done
hm2dev opened this issue Mar 19, 2024 · 5 comments · Fixed by #26891
Closed
1 task done

Comments

@hm2dev
Copy link
Contributor

hm2dev commented Mar 19, 2024

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

Yes, and the problem still exists.

Bug Description

When using Marlin on an MiniRambo Board, where the Extruder is used as another axis (here i-axis) by defining
#define I_STEP_PIN 34
#define I_DIR_PIN 43
#define I_ENABLE_PIN 26
and
#define I_MS1_PIN 65
#define I_MS2_PIN 66
(basically replacing the E0 pins with I pins)
compilation fails when trying to access I_MS3 pin, which is not defined.

Changing

#if HAS_I_MS_PINS

to
#if HAS_I_MS_PINS && PIN_EXISTS(I_MS3)
fixes this issue (at least for the i-axis).

Note, there is also a bunch of semicolons missing in the current stepper.cpp after "break" statements related to I, J, K, U, V and W axes in function Stepper::microstep_ms(...), e.g.

case I_AXIS: WRITE(I_MS3_PIN, ms3); break

Adding the above pre-processor condition and fixing the semicolons makes the configuration compile and results in a working i-axis.

Bug Timeline

Tried branch lts-2.1.1 first and then bugfix 2,1,x, Both are broken.

Expected behavior

Should compile.

Actual behavior

Compilation fails with undefined I_MS3_PIN.

Steps to Reproduce

see bug details

Version of Marlin Firmware

2.1.x

Printer model

Custom, based on MiniRambo Board

Electronics

MiniRambo

LCD/Controller

not relevant

Other add-ons

none

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

@hm2dev
Copy link
Contributor Author

hm2dev commented Mar 20, 2024

Is a Pull Request to fix this welcome, or is it to trivial for invoking this workflow?

@ellensp
Copy link
Contributor

ellensp commented Mar 20, 2024

PRs are welcomed and encouraged

hm2dev added a commit to hm2dev/Marlin that referenced this issue Mar 20, 2024
Fixes MarlinFirmware#26889.
Prevent switch cases in function Stepper::microstep_ms for axis I, J, K, U, V and W
from accessing x_MS3_PIN in case if x_MS3_PIN is not defined.
Add missing semicolon to break statements
@hm2dev
Copy link
Contributor Author

hm2dev commented Mar 20, 2024

Pull requested the fix in #26891 and also added a "test case" in #26892.

@thisiskeithb
Copy link
Member

Closing since you've opened a PR. I also left a review for how configs are added/tested, so be sure to check that out.

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 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants