-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Function "get_sdcard_commands" will cause wdt reset when print sdcard file #7449
Comments
Hi @MS1987
I suggest to edit code as follows:
Do you think this would work? |
@iosonopersia, I agree that your method would prevent the wdt reboot. But it will still block the other operation( like button operation and lcd refresh). So I think skip out will be better. What do you think?
|
Hi @MS1987, That behaviour should be used both in get_sdcard_commands() and in get_serial_commands(). I add that in those functions, the cycle continues also if MAX_CMD_SIZE is reached. If that happens, those functions continue to read chars until they find a \n or a \r char. So if someone sends a very long string without \n and \r, the printer will also get stuck for a while, until those EOL characters are found. I'm wondering if we could exit the cycle in that case too. |
Patch will be merged shortly. |
Less worried about this. |
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. |
Bug Report
Description: ---
When I print a gcode file (from sdcard) which has plenty of comment lines continuously, it causes the board reset.
Analasy: ---
As the watchdog was enabled, in the function "get_sdcard_commands()" there is code as following:
if (!sd_count) continue; // skip empty lines (and comment lines)
This "continue" will cause long time in the get command loop when the gcode file has enougth comment lines to consume.
Solve: ---
Replace the "continue" above with "return"
reproduce:
Use the gcode file to test.
test.zip
The text was updated successfully, but these errors were encountered: