Giter Site home page Giter Site logo

Comments (9)

mriscoc avatar mriscoc commented on August 20, 2024

You can use a g-code configuration file with custom g-codes to set the physical dimensions: https://github.com/mriscoc/Ender3V2S1/wiki/Custom-C-gcodes

from ender3v2s1.

oldo439 avatar oldo439 commented on August 20, 2024

OK. I just wanted to know where the problem is. Whether it's a bug in the firmware or it just doesn't load from configuration.h during compilation. I change the firmware quite often and every time I have to manually adjust the Dimensions in the Menu. G-code is usable, but not practical.
I assume the problem will be in the original Marlin code.

from ender3v2s1.

oldo439 avatar oldo439 commented on August 20, 2024

I found something in file: mriscoc\Marlin_Ender3v2\Marlin\src\lcd\e3v2\proui\dwin_defines.h

#if ProUI
  #undef X_BED_SIZE
  #undef Y_BED_SIZE
  #undef X_MIN_POS
  #undef Y_MIN_POS
  #undef X_MAX_POS
  #undef Y_MAX_POS
  #undef Z_MAX_POS
  #undef NOZZLE_PARK_POINT
  #if HAS_MESH
    #undef GRID_MAX_POINTS_X
    #undef GRID_MAX_POINTS_Y
    #undef GRID_MAX_POINTS
  #endif
  #if HAS_BED_PROBE
    #undef PROBING_MARGIN
    #undef Z_PROBE_FEEDRATE_SLOW
  #endif
  #undef INVERT_E0_DIR

  #define X_BED_SIZE (float)HMI_data.x_bed_size
  #define Y_BED_SIZE (float)HMI_data.y_bed_size
  #define X_MIN_POS  (float)HMI_data.x_min_pos
  #define Y_MIN_POS  (float)HMI_data.y_min_pos
  #define X_MAX_POS  (float)HMI_data.x_max_pos
  #define Y_MAX_POS  (float)HMI_data.y_max_pos
  #define Z_MAX_POS  (float)HMI_data.z_max_pos
  #define NOZZLE_PARK_POINT {(float)HMI_data.Park_point.x, (float)HMI_data.Park_point.y, (float)HMI_data.Park_point.z}

But I don't understand why is for ProUI this:
#undef X_BED_SIZE
and then
#define X_BED_SIZE (float) HMI_data.x_bed_size

I don't know, what is HMI_data

I used before:
#define DWIN_CREALITY_LCD_ENHANCED // Enhanced UI
and now is there:
#define DWIN_LCD_PROUI // MRiscoC Enable ProUI

from ender3v2s1.

mriscoc avatar mriscoc commented on August 20, 2024

If you disable the ProUI feature you will be able to set your physical dimensions using the configuration files but also you will lose the ability to edit the values from the menu and g-code.

from ender3v2s1.

oldo439 avatar oldo439 commented on August 20, 2024

I understand. But those default numbers must be entered somewhere in the source code. Can we find them? I would change it there if it can't be changed in Configuration.h
Even so, I adjust the settings with each new firmware. So I'll add the bed dimensions to the change list.

from ender3v2s1.

mriscoc avatar mriscoc commented on August 20, 2024

In the file dwin.cpp
Adds to DWIN_SetDataDefaults():

void DWIN_SetDataDefaults() {
  TERN_(DEBUG_DWIN, SERIAL_ECHOLNPGM("DWIN_SetDataDefaults"));
  DWIN_SetColorDefaults();
  DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
  TERN_(HAS_HOTEND,             HMI_data.HotendPidT = PREHEAT_1_TEMP_HOTEND);
  TERN_(HAS_HEATED_BED,         HMI_data.BedPidT    = PREHEAT_1_TEMP_BED);
  TERN_(HAS_HOTEND,             HMI_data.PidCycles  = 5);
  #ifdef PREVENT_COLD_EXTRUSION
    HMI_data.ExtMinT = EXTRUDE_MINTEMP;
    ApplyExtMinT();
  #endif
  #if HAS_HEATED_BED && ENABLED(PREHEAT_BEFORE_LEVELING)
    HMI_data.BedLevT = PREHEAT_1_TEMP_BED;
  #endif
  TERN_(ProUI, ProEx.SetDefaults());
  #if ENABLED(BAUD_RATE_GCODE)
    HMI_data.Baud115K = false;
    SetBaud250K();
  #endif
  HMI_data.x_bed_size = 230;
  HMI_data.y_bed_size = 227;
  HMI_data.x_max_pos  = 245;
  HMI_data.y_max_pos  = 230;
  HMI_data.z_max_pos  = 220;
  ProEx.ApplyPhySet();
}

from ender3v2s1.

oldo439 avatar oldo439 commented on August 20, 2024

Great, that's exactly what I needed. Thank you very much. I'll test it tomorrow.

from ender3v2s1.

oldo439 avatar oldo439 commented on August 20, 2024

It works. Thank you once again.

from ender3v2s1.

github-actions avatar github-actions commented on August 20, 2024

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.

from ender3v2s1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.