Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
8.99k stars 5.17k forks source link

Make MCU Protocol mismatch error message more specific #6463

Closed KevinOConnor closed 4 months ago

KevinOConnor commented 5 months ago

There is a good chance that an "MCU Protocol Error" may not require all MCUs to be updated, but the current error message seems to indicate that all MCUs that don't exactly match the current version should be updated. That may be misleading. Try to word the message to be a little more precise.

There is a risk this message may be more confusing for users, in that it doesn't explicitly state which MCUs to update.

@meteyou , @Drachenkaetzchen - FYI.

-Kevin

meteyou commented 5 months ago

If you take the error message exactly, it is fixed by this PR, but unfortunately, I don't see any improvement here with the "-dirty" tag, which is currently a real problem.

thijstriemstra commented 5 months ago

I updated just now to latest klipper and getting:

MCU Protocol error

This is frequently caused by running an older version of the
firmware on the MCU(s). Fix by recompiling and flashing the
firmware.

Your Klipper version is: v0.12.0-85-gd785b396-dirty
MCU(s) which should be updated:
mcu: Current version v0.12.0-60-g0665dc89
ext1: Current version v0.12.0-60-g0665dc89
adxl: Current version v0.12.0-60-g0665dc89
Up-to-date MCU(s):

Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.

mcu 'ext1': Command format mismatch: query_adxl345 oid=%c rest_ticks=%u vs query_adxl345 oid=%c clock=%u rest_ticks=%u

Guess this is new/normal? Will reflash..

I don't see any improvement here with the "-dirty" tag, which is currently a real problem.

What problem specifically?

Update:

after updating the EBB42 (ext1) the error has not changed though, and I'd expect ext1 to be in the list at bottom. Probably related to the -dirty thing?

MCU Protocol error

This is frequently caused by running an older version of the
firmware on the MCU(s). Fix by recompiling and flashing the
firmware.

Your Klipper version is: v0.12.0-85-gd785b396-dirty
MCU(s) which should be updated:
mcu: Current version v0.12.0-60-g0665dc89
ext1: Current version v0.12.0-85-gd785b396
adxl: Current version v0.12.0-60-g0665dc89
Up-to-date MCU(s):

Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.

mcu 'adxl': Command format mismatch: query_adxl345 oid=%c rest_ticks=%u vs query_adxl345 oid=%c clock=%u rest_ticks=%u

Update 2: eventually error went away after updating all mcu's

meteyou commented 5 months ago

after updating the EBB42 (ext1) the error has not changed though, and I'd expect ext1 to be in the list at bottom. Probably related to the -dirty thing?

yes exactly. that's what i'm talking about in my post above.

github-actions[bot] commented 4 months ago

Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html

There are some steps that you can take now:

  1. Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
  2. Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
  3. Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.

Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.

Best regards, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

dockterj commented 4 months ago

I'm not a reviewer, however, I reviewed this change according to the steps in the CONTRIBUTING document and everything looks good to me.

@meteyou - when I compile and flash my mcus (AVR) from a dirty repo the version on the mcu reports with the -dirty suffix. Is there a discord or discourse discussion of this issue that I can refer to? @thijstriemstra I'm confused that your ext1 mcu doesn't have the -dirty suffix on the reported version.

dockterj commented 4 months ago

I've not verified this but a quick look at the code seems to indicate that klippy.py has had changes so that untracked files will append -dirty to the version klippy reports. However, I don't see those changes in buildcommands.py. If this is the correct reason then my opinion is it should be tracked by a separate issue/PR.

meteyou commented 4 months ago

sry @dockterj, we talked about that in a non public discord channel before this PR.

KevinOConnor commented 4 months ago

Thanks for the feedback. There doesn't seem to be much interest in this PR (as it is currently implemented). So, I'm going to close it.

-Kevin