I have a Tronxy X5SA printer upon which I want to install the latest Marlin firmware v2.0.9.1.
I take the configuration example on GitHub for the X5SA printer and modify the lines in configuration.h
as recommended in the guide (see this URL).
In Visual Studio Code, when I compile, I obtain this error :
Marlin\src\gcode\motion\G2_G3.cpp: In function 'void plan_arc(const xyze_pos_t&, const ab_float_t&, bool, uint8_t)':
Marlin\src\gcode\motion\G2_G3.cpp:154:7: error: 'MM_PER_ARC_SEGMENT' was not declared in this scope
MM_PER_ARC_SEGMENT
^~~~~~~~~~~~~~~~~~
Marlin\src\gcode\motion\G2_G3.cpp:154:7: note: suggested alternative: 'MAX_ARC_SEGMENT_MM'
^~~~~~~~~~~~~~~~~~
MAX_ARC_SEGMENT_MM
Compiling .pio\build\chitu_f103\src\src\gcode\sd\M20.cpp.o
*** [.pio\build\chitu_f103\src\src\gcode\motion\G2_G3.cpp.o] Error 1
========================================================================================= [FAILED] Took 71.95 seconds =========================================================================================
Environment Status Duration
------------- -------- ------------
chitu_f103 FAILED 00:01:11.945
==================================================================================== 1 failed, 0 succeeded in 00:01:11.945 ====================================================================================
PS D:\TRONXY\Marlin-2.0.9.1\Marlin-2.0.9.1> echo "done" >C:\Users\myUser\AppData\Local\Temp\ipc
PS D:\TRONXY\Marlin-2.0.9.1\Marlin-2.0.9.1>
Here is the code in G2_G3.cpp
on line 154, but I need some help to understand why it's wrong, and how to fix...
// Start with a nominal segment length
float seg_length = (
#ifdef ARC_SEGMENTS_PER_R
constrain(MM_PER_ARC_SEGMENT * radius, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R)
#elif ARC_SEGMENTS_PER_SEC
_MAX(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MM_PER_ARC_SEGMENT)
#else
MM_PER_ARC_SEGMENT // LINE 154 HERE!!
#endif
);
// Divide total travel by nominal segment length
uint16_t segments = FLOOR(mm_of_travel / seg_length);
NOLESS(segments, min_segments); // At least some segments
seg_length = mm_of_travel / segments;
I have tried to compile the BugFix version successfully, but unfortunately the bugfix version does not work properly with my printer (I can't get the bed to lift to the probe. I have opened another post for the bugfix version issue).