in
G0 to G3 were previously acknowledged in the get_command method, causing
them to be possibly acknowledged before commands coming after them that
were acknowledged in process_commands.
This patch fixes this, moving the acknowledgement of G0 to G3 to the
process_commands method as well. These commands are therefore no
longer acknowledged when the enter the cmd_buffer but instead only
acknowledged when the enter the plan_buffer.
Guaranteeing that commands are acknowledged in the same order in which
they were received by the firmware allows host software to be able to
track the life cycle of commands and such a better management of the
firmware's serial buffers as well as better internal command processing
and response parsing without having to depend on throwing an epic
amount of regular expressions against each line received back from the
firmware.
FixesErikZalm/Marlin#1147
Improvement to avoid reinitializing delay buffer with every print. Fixed
issues in buffer indexing and memory out of bounds due to floating point
imprecision. Simplified the code by avoiding conversion to standard
diameter and 1cu mm extrusion, which caused complications in determining
mm extruded.
chdkActive was set to false regardless of (millis() - chdkHigh) being bigger than the CHDK_DELAY or not. So if (millis() - chdkHigh) wasn't bigger than the delay the first time, the CHDK would never be set back to LOW.
Also, don't return from the function, as there might be other stuff to do, after the CHDK check.
This feature allows the printer to read the filament diameter
automatically and adjust the printer in real time. Added code to read
an analog voltage that represents a filament diameter measurement. This
measurement is delayed in a ring buffer to compensate for sensors that
are a distance away from the extruder. The measurement is used to
adjust the volumetric_multiplier for the extruder. Some additional g
codes (M404, M405, M406, M407) are used to set parameters and turn
on/off the control. g code M221 is updated. Pins for RAMPS1.4, RAMBO,
and Printrboard are identified for analog input. The configuration file
is updated with relevant user parameters.
Positioning of string terminator to truncate checksum from the commands
M23, M28, M30, M32, M928 and M117 was off by one, causing the last
letter of the actual command to be truncated instead of just the
checksum.
In case of the SD commands this caused checksummed commands targeting
existing files to fail since the last letter of the filename was
truncated.
In case of M117 this caused the last given letter not to be displayed.
This patch fixes the off-by-one error and sets the null terminator
on the exact position of the * starting the checksum instead of the
character before that.
FW retraction is extended onto swap retraction invoked by 'G10 S1'.
Bookkeeping of the retract state of all extruders allows for having one
extruder fw standard retracted while another extruder is swap retracted.
An LCD menu item for the swap retract and recover length was added.