MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.34k stars 19.26k forks source link

[FR] Plus 3 Linear Axes for Core #22490

Open mikkelam opened 3 years ago

mikkelam commented 3 years ago

Is your feature request related to a problem? Please describe.

I love the new linear axes, but it seems to be unimplemented for CORE platforms

Are you looking for hardware support?

No response

Describe the feature you want

Have LINEAR_AXES > 4 work with COREXY and so on

Additional context

Warnings im getting

In file included from Marlin/src/module/../inc/MarlinConfigPre.h:37,
                 from Marlin/src/module/../inc/MarlinConfig.h:28,
                 from Marlin/src/module/../MarlinCore.h:24,
                 from Marlin/src/module/planner.h:33,
                 from Marlin/src/module/planner.cpp:65:
Marlin/src/module/planner.cpp: In static member function 'static bool Planner::_populate_block(block_t*, bool, const abce_long_t&, feedRate_t, uint8_t, const_float_t)':
Marlin/src/module/planner.cpp:1869:5: warning: unused variable 'di' [-Wunused-variable]
 1869 |     di = target.i - position.i,
      |     ^~
Marlin/src/module/../inc/../core/macros.h:298:38: note: in definition of macro 'LIST_5'
  298 | #define LIST_5( A,B,C,D,E,...) A,B,C,D,E
      |                                      ^
Marlin/src/module/../inc/../core/macros.h:306:24: note: in expansion of macro '_LIST_N'
  306 | #define LIST_N(N,V...) _LIST_N(N,V)
      |                        ^~~~~~~
Marlin/src/module/../inc/../core/types.h:44:32: note: in expansion of macro 'LIST_N'
   44 | #define LINEAR_AXIS_LIST(V...) LIST_N(LINEAR_AXES, V)
      |                                ^~~~~~
Marlin/src/module/../inc/../core/types.h:52:35: note: in expansion of macro 'LINEAR_AXIS_LIST'
   52 | #define LOGICAL_AXIS_LIST(E,V...) LINEAR_AXIS_LIST(V) LIST_ITEM_E(E)
      |                                   ^~~~~~~~~~~~~~~~
Marlin/src/module/planner.cpp:1864:11: note: in expansion of macro 'LOGICAL_AXIS_LIST'
 1864 |   int32_t LOGICAL_AXIS_LIST(
      |           ^~~~~~~~~~~~~~~~~
Marlin/src/module/planner.cpp:1870:5: warning: unused variable 'dj' [-Wunused-variable]
 1870 |     dj = target.j - position.j,
      |     ^~
Marlin/src/module/../inc/../core/macros.h:298:40: note: in definition of macro 'LIST_5'
  298 | #define LIST_5( A,B,C,D,E,...) A,B,C,D,E
      |                                        ^
Marlin/src/module/../inc/../core/macros.h:306:24: note: in expansion of macro '_LIST_N'
  306 | #define LIST_N(N,V...) _LIST_N(N,V)
      |                        ^~~~~~~
Marlin/src/module/../inc/../core/types.h:44:32: note: in expansion of macro 'LIST_N'
   44 | #define LINEAR_AXIS_LIST(V...) LIST_N(LINEAR_AXES, V)
      |                                ^~~~~~
Marlin/src/module/../inc/../core/types.h:52:35: note: in expansion of macro 'LINEAR_AXIS_LIST'
   52 | #define LOGICAL_AXIS_LIST(E,V...) LINEAR_AXIS_LIST(V) LIST_ITEM_E(E)
      |                                   ^~~~~~~~~~~~~~~~
Marlin/src/module/planner.cpp:1864:11: note: in expansion of macro 'LOGICAL_AXIS_LIST'
 1864 |   int32_t LOGICAL_AXIS_LIST(
      |           ^~~~~~~~~~~~~~~~~
Compiling .pio/build/LPC1768/src/src/module/tool_change.cpp.o
Marlin/src/module/planner.cpp:2517:110: warning: 'steps_dist_mm.Planner::_populate_block(block_t*, bool, const abce_long_t&, feedRate_t, uint8_t, const_float_t)::DistanceMM::<anonymous>.XYZEval<float>::<anonymous>.XYZEval<float>::<unnamed union>::<anonymous>.XYZEval<float>::<unnamed union>::<unnamed struct>::i' may be used uninitialized in this function [-Wmaybe-uninitialized]
 2517 |         LOGICAL_AXIS_ARRAY(steps_dist_mm.e, steps_dist_mm.x, steps_dist_mm.y, steps_dist_mm.z, steps_dist_mm.i, steps_dist_mm.j, steps_dist_mm.k)
      |                                                                                                              ^
Marlin/src/module/planner.cpp:2517:127: warning: 'steps_dist_mm.Planner::_populate_block(block_t*, bool, const abce_long_t&, feedRate_t, uint8_t, const_float_t)::DistanceMM::<anonymous>.XYZEval<float>::<anonymous>.XYZEval<float>::<unnamed union>::<anonymous>.XYZEval<float>::<unnamed union>::<unnamed struct>::j' may be used uninitialized in this function [-Wmaybe-uninitialized]
 2517 |         LOGICAL_AXIS_ARRAY(steps_dist_mm.e, steps_dist_mm.x, steps_dist_mm.y, steps_dist_mm.z, steps_dist_mm.i, steps_dist_mm.j, steps_dist_mm.k)
      |                                                           
Vertabreak commented 3 years ago

working with mikkelam i got marlin to compile we await testing on his hardware.

thinkyhead commented 3 years ago

I've just pushed a patch to bugfix-2.0.x to get compilation to pass. Please test at your earliest convenience and let us know if more patches need to be made for your particular setup.

Fjederhaek commented 3 years ago

Working with mikkelam IRL. The patch compiles without errors or warnings, but we are still not able to move our A and B axis. We are able to read the expected values from our tmc2130 drivers with M122.

Fjederhaek commented 3 years ago

I have made some changes to planner which fixes the issue on our end. I have created a pull request