Skip to content

Unable to use M421 (Set Mesh Level Matrix) commands due to usage conflict #3745

@bdowling

Description

@bdowling

I think I should have posted this over here, sorry. Realized when I couldn't find the RCBugFix branch in Dev.

https://github.com/MarlinFirmware/MarlinDev/issues/421

(Love the irony of getting it issue number 421 there though)


M421 are unable to be set due to a conflict in the code regarding what X and Y values are to be passed. Well, technically, I can set the X0, Y0 ;)

https://github.com/MarlinFirmware/Marlin/blob/RCBugFix/Marlin/Marlin_main.cpp#L5855

The test of the parameters are checking that an index is being passed, but then those values are being handed off to the mapping functions mbl.select_x_index(x) and respective y rather than being used as an index.

I would like to propose that the interface be modified to offer consistency such that the relevant output from M503 can be pasted back into the serial to be able to set/reload these parameters if so needed. Currently M503 outputs the absolute X and Y coordinates. It could go either way, change the M503, or change M421 to accept the physical coordinates. I'm not sure how widely this is used. I think I must be the first to try. ;)

Ref: http://reprap.org/wiki/G-code#M421:_Set_a_Mesh_Bed_Leveling_Z_coordinate

Willing to submit a PR on this, just wanted to open the discussion for the above.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions