Poket-Jony / Marlin-A4MaxPro-2.0.x

🖨 Marlin 2.0.x optimized for the Anycubic 4Max Pro 3D printer
GNU General Public License v3.0
54 stars 18 forks source link

[BUG] Compilation error with defined CASE_LIGHT_NO_BRIGHTNESS #44

Open ABATAPA opened 4 years ago

ABATAPA commented 4 years ago

When CASE_LIGHT_NO_BRIGHTNESS is defined in Configuration_adv.h, compilation is aborted with an error:

sketch/src/lcd/extui/lib/dwin/DwinTFTCommand.cpp: In member function 'void DwinTFTCommandClass::handleSetCaseLight()':
sketch/src/lcd/extui/lib/dwin/DwinTFTCommand.cpp:600:29: error: 'getCaseLightBrightness_percent' is not a member of 'ExtUI'
   float brightness = ExtUI::getCaseLightBrightness_percent();
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sketch/src/lcd/extui/lib/dwin/DwinTFTCommand.cpp:600:29: note: suggested alternative: 'getProgress_percent'
   float brightness = ExtUI::getCaseLightBrightness_percent();
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             getProgress_percent
sketch/src/lcd/extui/lib/dwin/DwinTFTCommand.cpp:601:10: error: 'setCaseLightBrightness_percent' is not a member of 'ExtUI'
   ExtUI::setCaseLightBrightness_percent(float(brightness == 100 ? 0 : brightness + 25));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sketch/src/lcd/extui/lib/dwin/DwinTFTCommand.cpp:601:10: note: suggested alternative: 'setFeedrate_percent'
   ExtUI::setCaseLightBrightness_percent(float(brightness == 100 ? 0 : brightness + 25));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          setFeedrate_percent
exit status 1

I am trying to compile the firmware without PWM highlighting, because it flickers when printing (soft PWM?).

Arduino IDE 1.8.13 / master 3b083dd8a update to marlin 2.0.5.4

Poket-Jony commented 4 years ago

Thanks for the report, the method "DwinTFTCommandClass::handleSetCaseLight()" still has to be provided with an if statement in order to catch the case that "CASE_LIGHT_NO_BRIGHTNESS" is set.