classicrocker883 / MRiscoCProUI

This is optimized firmware for Voxelab Aquila & Ender3 V2/S1 3D printers.
https://classicrocker883.github.io/
Other
74 stars 17 forks source link

Fixes #64 [BUG] Crash and reboot after second time gcode preview. #84

Closed Nazar78 closed 8 months ago

Nazar78 commented 8 months ago

Fixes [BUG] Crash and reboot after second time gcode preview. modified: Marlin/Configuration.h modified: Marlin/src/lcd/e3v2/proui/custom_gcodes.cpp modified: Marlin/src/lcd/e3v2/proui/dwin.cpp renamed: Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.cpp -> Marlin/src/lcd/e3v2/proui/gcode_preview.cpp modified: Marlin/src/lcd/e3v2/proui/gcode_preview.h deleted: Marlin/src/lcd/e3v2/proui/gcode_preview_nopro.h modified: configurations/Andrew427/Configuration.h modified: configurations/BTT-SKR_Mini_E3_V2/ConfigurationMM.h modified: configurations/BTT-SKR_Mini_E3_V2/ConfigurationUBL.h modified: configurations/BTT-SKR_Mini_E3_V3/ConfigurationMM.h modified: configurations/BTT-SKR_Mini_E3_V3/ConfigurationUBL.h modified: configurations/Creality Ender/BLT/Configuration.h modified: configurations/Creality Ender/Default-NP/Configuration.h modified: configurations/Creality Ender/MM/Configuration.h modified: configurations/Creality Ender/UBL/Configuration.h modified: configurations/Voxelab Aquila 427/BLT/Configuration.h modified: configurations/Voxelab Aquila 427/Default-NP/Configuration.h modified: configurations/Voxelab Aquila 427/MM/Configuration.h modified: configurations/Voxelab Aquila 427/UBL/Configuration.h modified: configurations/Voxelab Aquila/BLT/Configuration.h modified: configurations/Voxelab Aquila/BLT/ConfigurationPro.h modified: configurations/Voxelab Aquila/Default-NP/Configuration.h modified: configurations/Voxelab Aquila/MM/Configuration.h modified: configurations/Voxelab Aquila/UBL/Configuration.h modified: configurations/Voxelab Aquila/UBL/ConfigurationPro.h modified: configurations/Voxelab Aquila/X3/Configuration.h

classicrocker883 commented 8 months ago

so thats it then? basically instead of using the private proui library gcode_preview we now use the "NOPRO" one (used in Marlin source code) and that is the fix?

one thing I can suggest to change, is fileprop.
either we can change all the fileprop like in dwin.cpp - fileprop.isConfig
to fileprop_nopro

or change fileprop_nopro back to just fileprop. however, wouldn't that conflict with the proui lib with that already named??

if so, perhaps then we could change all instances of HAS_GCODE_PREVIEW to something like GCODE_PREVIEW so this doesnt conflict with the PROUI_EX lib of the same name.

Nazar78 commented 8 months ago

so thats it then? basically instead of using the private proui library gcode_preview we now use the "NOPRO" one (used in Marlin source code) and that is the fix?

Yup². It's a mix use of both private libs (still needed) and nopro (for those major portion we can't change in the private libs).

one thing I can suggest to change, is fileprop. either we can change all the fileprop like in dwin.cpp - fileprop.isConfig to fileprop_nopro

or change fileprop_nopro back to just fileprop. however, wouldn't that conflict with the proui lib with that already named??

fileprop is already been used by the private libs, so fileprop_nopro is just a new out-of-library reference which you can rename to just anything like fileprop_nolib.

if so, perhaps then we could change all instances of HAS_GCODE_PREVIEW to something like GCODE_PREVIEW so this doesnt conflict with the PROUI_EX lib of the same name.

There's no conflict, as you can see I've actually replaced the gcode_preview_nopro.cpp with gcode_preview.cpp and dereference gcode_preview.h (but still needed in dwin.cpp, think for the laser module), thus changing all the HAS_GCODE_PREVIEW_NOPRO to HAS_GCODE_PREVIEW.

classicrocker883 commented 8 months ago

I changed things so Gcode Preview can work without PROUI_EX (ProUI extended features) enabled, for -NoPro versions.

not sure what a couple functions did, in the original file_header.h, but I basically transferred that over to gcode_preview.h, and commented those out, however I do not know if they are needed with the Laser function.

if you can let me know how everything works, or any changes. but so far it is working great. thank you for the fix!!