MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
15.95k stars 19.08k forks source link

Fix M115 parsing #27050

Closed kisslorand closed 2 weeks ago

kisslorand commented 2 weeks ago

Description

PR #26806 broke the parsing of the printer's name ("MACHINE_TYPE:") on some printers. (The parsing is done by extracting the text between "MACHINE_TYPE:" and "EXTRUDER_COUNT:".) This PR fixes this issue.

The parameter "KINEMATICS:" is moved to a place where it is preceded by numerical values (extruder count or axis count) so it does not interfere with parsing of the extruder count and/or axis count.

thisiskeithb commented 2 weeks ago

I've already patched this in BTT's TFT firmware: https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/pull/2913

This PR now breaks the printer name in their firmware again.

kisslorand commented 2 weeks ago

There are numerous printers with other FW than the one mentioned. It's best practice to address the underlying cause of an issue rather than just its immediate effect.

thisiskeithb commented 2 weeks ago

There are numerous printers with other FW than the one mentioned. It's best practice to address the underlying cause of an issue rather than just its immediate effect.

Can you provide an example? My fix is backward compatible with older & newer versions of Marlin.

kisslorand commented 2 weeks ago

An example would be any random custom firmware. (ex.: https://www.thingiverse.com/thing:4294049)

thisiskeithb commented 2 weeks ago

An example would be any random custom firmware. (ex.: https://www.thingiverse.com/thing:4294049)

They just need to pull in the latest TFT firmware from BTT's repo.

@digant73: Don't forget to update your fork(s) 😄

kisslorand commented 2 weeks ago

Than we're back what I've just said: "It's best practice to address the underlying cause of an issue rather than just its immediate effect."

thisiskeithb commented 2 weeks ago

Than we're back what I've just said: "It's best practice to address the underlying cause of an issue rather than just its immediate effect."

This PR is just a workaround when the actual fix has already been applied to BTT's TFT firmware.

Update your TFT firmware to the latest version and you'll be set.