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.24k stars 19.22k forks source link

[BUG] Temperature::preheat_end_ms_hotend missing in 2.1.2.2 #26802

Closed Fiamat closed 6 months ago

Fiamat commented 8 months ago

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

Yes, and the problem still exists.

Bug Description

After setting MILLISECONDS_PREHEAT_TIME to any positive value the temperature.cpp checks for nonexisting member preheat_end_ms_hotend in Temperature class. Indeed temperature.h doesn't declare such variable. I see that bugfix branch already brought back this variable, but official .zip with Marlin 2.1.2.2 (https://marlinfw.org/meta/download/) contains this bug.

Bug Timeline

No response

Expected behavior

No response

Actual behavior

During build process a following error is thrown:

Marlin\src\module\temperature.cpp:598:12: error: 'millis_t Temperature::preheat_end_ms_hotend [1]' is not a static data member of 'class Temperature'

Steps to Reproduce

  1. Uncomment MILLISECONDS_PREHEAT_TIME in Configuration_adv.h and set it to any positive value
  2. Try building the software

My Configuration(_adv).h: Marlin.zip

Version of Marlin Firmware

2.1.2.2 (official .zip)

Printer model

Ender 3 v2

Electronics

Bigtreetech SKR Mini E3 v3

LCD/Controller

StockEnder 3 v2

Other add-ons

BL-Touch

Bed Leveling

UBL Bilinear mesh

Your Slicer

None

Host Software

None

Don't forget to include

Additional information & file uploads

No response

ellensp commented 8 months ago

As a work around In Marlin/src/module/temperature.cpp

Find

#if MILLISECONDS_PREHEAT_TIME > 0
  millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 };
#endif

and replace it with

#if MILLISECONDS_PREHEAT_TIME > 0
  millis_t Temperature::preheat_end_time[HOTENDS] = { 0 };
#endif
Fiamat commented 8 months ago

As a work around In Marlin/src/module/temperature.cpp

Find

#if MILLISECONDS_PREHEAT_TIME > 0
  millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 };
#endif

and replace it with

#if MILLISECONDS_PREHEAT_TIME > 0
  millis_t Temperature::preheat_end_time[HOTENDS] = { 0 };
#endif

I use temperature sensor "66 : Trianglelab T-D500 500°C High Temperature Thermistor" which has a long dead zone around room temperature. Event the Marlin itself throws warning when MILLISECONDS_PREHEAT_TIME is below 30e3 ms with this sensor. I guess that the proposed workaround can cause problems with temperature control in my setup (?).

ellensp commented 8 months ago

Marlin has this code

#if ANY_E_SENSOR_IS(66)
...(skipped code)... 
 #if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED < 5
    #error "Thermistor 66 requires MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED ≥ 5."
  #elif MILLISECONDS_PREHEAT_TIME < 15000
    #error "Thermistor 66 requires MILLISECONDS_PREHEAT_TIME ≥ 15000, but 30000 or higher is recommended."

to ensure MILLISECONDS_PREHEAT_TIME is > 15000 for a type 66

thisiskeithb commented 6 months ago

Closing since this is already fixed in bugfix-2.1.x.

thisiskeithb commented 5 months ago

Patch for 2.1.x submitted:

github-actions[bot] commented 3 months 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.