forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some Test to investigate input stream errors #14
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The easiest way to provoke some errors is to acticate: #define AUTO_BED_LEVELING_FEATURE #define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" in Configuration.h and send some g-code-file including a G29. With RepetierHostSettings_1.png, i runned killercone.gcode an got Test_1.txt, sent with Repetier host. With RepetierHostSettings_2.png, i runned killercone.gcode an got Test_2.txt, sent with Repetier host. Search for "error:". We get some of our newly introduced Error:Serial: incoming chars rejected - ring buffer full followd by Error:checksum mismatch, Last Line: xx and or Error:Line Number is not Last Line Number+1, Last Line: xx Retesting with our new error deactivated gives the same errors without the new one. With the second RH-settings we get the errors a bit later - with the second G29. Thats caused by a different buffer filling strategy. With Pronterface i get verry similar errors as with RepetierHostSettings_2.png Lets take a clother view on Marlins buffer usage.
ADVANCED_OK provides some output for the buffer usage. Now we get: ok N34 P10 B1 With N = Linenumber, P = free entries in the planner buffer, B = free entrys in the buffer for preparsed g-codes. Sadly no information about the RX-buffer. A test with RepetierHostSettings_2.png gives Test_3.txt. First search for "error:" - the errors seem to occure much later. Then search for "N40" - Why do we OK that so often? Likely these are the commands we encued with G29. We have not had linenumbers for them. But G29 was sent with N26? Someting is wrong.
by R = free places in the RX-buffer and the output of the g.code line we just finished. See Test_4.txt The original ADVANCED_OK sends a N-number not matching the actual line. The number send corosponds with the line just put __in__ the comand buffer, not the one we finished.
Send the correct line number. If no N was in the command - non't send an N. See Test_5.txt Now the linenumbers do make sense. Let's have a look on the R values. Until the first G29 they are 128 - unused, everything fitted into the B-buffer. Behind the first G29 we begin to use the R-buffer. Somewhen behind the second G29 the R-buffer is completely full and we get errors.
else send "echo:". Test with RepetierHostSettings_2.png -> Test_6.txt Test with RepetierHostSettings_1.png -> Test_7.txt Test with Pronterface Watch ON -> Test_8.txt Test with Pronterface Watch OFF -> Test_9.txt No errors - in all 4 cases! Let's have a closer lock. a) Test_6.txt line 33-36: N skips from N2 to N4 -> that's an M105 - RepetieHost does not log M105 but sends a line number with it. Test_7.txt line 32-33: the same Test_8.txt line 163-165; Pronterface sends M105 without N that does not matter because M105 sends it's own ok - not with ADVANCED_OK b) Looking at the end of the test-files The P-buffer is well used in all tests. The B-buffer is only used with RH (RepetierHostSettings_1.png Test_7.txt) mode and when lines are injected by enqueuecommands_P (Test_6.txt 82-108, Test_8.txt 61-105, Test_9.txt 55-91) The R-buffer has about the same use as the B-buffer. Pronterface and RH in mode RepetierHostSettings_2.png use a strategy to send a new line for every "ok" they receive. RH in mode RepetierHostSettings_1.png tries to count how many chars are in the buffer. So if a long line was "ok"ed it may send two short lines (f.e. Test_7.txt 740-760). All in all the use of the buffers is bad in all cases, but at least we are save now - not loosing input. Can we do something to improve the buffer usage?
Tries to speed up. Preliminary Result: OK for 115200bd!!! Likely a race condition between checkRx() and store_char() at 250000bd. Possibly a race condition between those two and get_command(). Replacing MarlinSerial with HardwareSerial does not help for 250000bd. For 115200bd HardwareSerial is not better but biger.
AnHardt
pushed a commit
that referenced
this pull request
Aug 25, 2019
# This is the 1st commit message: Add Support for ADIMLab Granty # The commit message #2 will be skipped: # Update Configuration.h # The commit message #3 will be skipped: # Add files via upload # # Add Support for ADIMLab Granty # The commit message #4 will be skipped: # Create Configuration.h # The commit message #5 will be skipped: # Delete Configuration.h # The commit message #6 will be skipped: # Create Test.h # The commit message #7 will be skipped: # Add files via upload # The commit message #8 will be skipped: # Delete Test.h # The commit message #9 will be skipped: # Delete Configuration.h # The commit message #10 will be skipped: # Delete Configuration_adv.h # The commit message #11 will be skipped: # Add files via upload # # Add ADIMLab Pins # The commit message #12 will be skipped: # Add files via upload # # Add Bootscreen # The commit message #13 will be skipped: # Update Configuration.h # # Add Bootscreen # The commit message #14 will be skipped: # Update pins.h # # Add ADIMLab Board # The commit message #15 will be skipped: # Update boards.h # # Add ADIMLab Granty # The commit message #16 will be skipped: # Update Makefile # # Add ADIMLab Granty # The commit message #17 will be skipped: # Update boards.h # The commit message #18 will be skipped: # Update Makefile
AnHardt
pushed a commit
that referenced
this pull request
Aug 25, 2019
* # This is a combination of 18 commits. # This is the 1st commit message: Add Support for ADIMLab Granty # The commit message #2 will be skipped: # Update Configuration.h # The commit message #3 will be skipped: # Add files via upload # # Add Support for ADIMLab Granty # The commit message #4 will be skipped: # Create Configuration.h # The commit message #5 will be skipped: # Delete Configuration.h # The commit message #6 will be skipped: # Create Test.h # The commit message #7 will be skipped: # Add files via upload # The commit message #8 will be skipped: # Delete Test.h # The commit message #9 will be skipped: # Delete Configuration.h # The commit message #10 will be skipped: # Delete Configuration_adv.h # The commit message #11 will be skipped: # Add files via upload # # Add ADIMLab Pins # The commit message #12 will be skipped: # Add files via upload # # Add Bootscreen # The commit message #13 will be skipped: # Update Configuration.h # # Add Bootscreen # The commit message #14 will be skipped: # Update pins.h # # Add ADIMLab Board # The commit message #15 will be skipped: # Update boards.h # # Add ADIMLab Granty # The commit message #16 will be skipped: # Update Makefile # # Add ADIMLab Granty # The commit message #17 will be skipped: # Update boards.h # The commit message #18 will be skipped: # Update Makefile * Add Support for ADIMLab Granty * Optimize bootscreen * Update Makefile Updated Description * Update boards.h Updated Description * Update pins_HJC2560C_REV2.h Updated Description * Update Configuration.h Added Author + Custom_Machine_Name * Create _Bootscreen.h Add Bootscreen * Add files via upload Add ADIMLab Granty v1 * Update boards.h Add ADIMLab Granty v1 * Update Makefile Add ADIMLab Granty v1 * Update pins_HJC2560C_REV2.h * Consolidate Granty configs * config updates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And two experimental solutions.
If you are interested, read commit by commit.