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.18k stars 19.21k forks source link

[BUG] Error on compile with DWIN_CREALITY_LCD_ENHANCED and any AUTO_BED_LEVELING_ #22741

Closed electronicm closed 3 years ago

electronicm commented 3 years ago

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

If I use the current version bugfix-2.0.x with the options

In file included from Marlin\src\gcode\bedlevel\ubl\../../../inc/MarlinConfigPre.h:37,
                 from Marlin\src\gcode\bedlevel\ubl\../../../inc/MarlinConfig.h:28,
                 from Marlin\src\gcode\bedlevel\ubl\M421.cpp:27:
Marlin\src\gcode\bedlevel\ubl\M421.cpp: In static member function 'static void GcodeSuite::M421()':
Marlin\src\gcode\bedlevel\ubl\M421.cpp:72:39: error: 'DWIN_MeshUpdate' was not declared in this scope; did you mean 'DWIN_Update'?
   72 |     TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ij.x, ij.y, zval));
      |                                       ^~~~~~~~~~~~~~~
Marlin\src\gcode\bedlevel\ubl\../../../inc/../core/macros.h:560:26: note: in definition of macro 'THIRD'
  560 | #define THIRD(a,b,c,...) c
      |                          ^
Marlin\src\gcode\bedlevel\ubl\../../../inc/../core/macros.h:204:29: note: in expansion of macro '___TERN'
  204 | #define __TERN(T,V...)      ___TERN(_CAT(_NO,T),V)  // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
      |                             ^~~~~~~
Marlin\src\gcode\bedlevel\ubl\../../../inc/../core/macros.h:203:29: note: in expansion of macro '__TERN'
  203 | #define _TERN(E,V...)       __TERN(_CAT(T_,E),V)    // Prepend 'T_' to get 'T_0' or 'T_1'
      |                             ^~~~~~
Marlin\src\gcode\bedlevel\ubl\../../../inc/../core/macros.h:202:29: note: in expansion of macro '_TERN'
  202 | #define TERN_(O,A)          _TERN(_ENA_1(O),,A)     // OPTION ? 'A' : '<nul>'
      |                             ^~~~~
Marlin\src\gcode\bedlevel\ubl\M421.cpp:72:5: note: in expansion of macro 'TERN_'
   72 |     TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ij.x, ij.y, zval));
      |     ^~~~~
*** [.pio\build\STM32F103RET6_creality\src\src\gcode\bedlevel\ubl\M421.cpp.o] Error 1

If I use the current version bugfix-2.0.x with the options

Bug Timeline

new bug(?)

Expected behavior

It should work or give a sanity check with warning.

Actual behavior

I do not try DWIN_CREALITY_LCD_ENHANCED.

Steps to Reproduce

Compile the mentioned version with the described customizations and my configs.

Version of Marlin Firmware

bugfix-2.0.x(2021-09-10)

Printer model

Creality Ender 3v2

Electronics

Creality 4.2.2

Add-ons

CR-Touch

Bed Leveling

UBL Bilinear mesh

Your Slicer

No response

Host Software

No response

Additional information & file uploads

Configuration.zip

thinkyhead commented 3 years ago

These are relatively simple to patch. I'll push a fix shortly.

CC: @mriscoc

mriscoc commented 3 years ago

These are relatively simple to patch. I'll push a fix shortly.

CC: @mriscoc

Thanks

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.