mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-17 21:12:53 -07:00
Fix of Slicer image not good #4992
Tighter parsing of PrusaSlicer's own G-code annotations to avoid clashes with comments inside user G-codes. Also the GCodeReader was extended to return string_views instead of copying a substring, and the GCodeProcessor was partially adapted to string_views.
This commit is contained in:
@@ -165,9 +165,10 @@ static inline float parse_float(const char *&line)
|
||||
return result;
|
||||
};
|
||||
|
||||
#define EXTRUSION_ROLE_TAG ";_EXTRUSION_ROLE:"
|
||||
bool PressureEqualizer::process_line(const char *line, const size_t len, GCodeLine &buf)
|
||||
{
|
||||
static constexpr const char *EXTRUSION_ROLE_TAG = ";_EXTRUSION_ROLE:";
|
||||
|
||||
if (strncmp(line, EXTRUSION_ROLE_TAG, strlen(EXTRUSION_ROLE_TAG)) == 0) {
|
||||
line += strlen(EXTRUSION_ROLE_TAG);
|
||||
int role = atoi(line);
|
||||
|
||||
Reference in New Issue
Block a user