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] Ender 5 plus with #define DGUS_LCD_UI RELOADED cannot use the screen move without homing #25461

Closed Neo2003 closed 1 year ago

Neo2003 commented 1 year ago

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

Yes, and the problem still exists.

Bug Description

I just cannot move any axe from the screen on Ender 5 Plus without doing a home before. I am in front of the printer, then I know where I can move. The firmware should not prevent me from moving X, Y or Z.

I am just probably miss a configuration setting but could not find any related to M84 or Homing that would prevent the screen from allowing to move without homing first.

Bug Timeline

With Marlin 2.1 and DGUS-reloaded on the screen

Expected behavior

Allow moving the head at anytime

Actual behavior

I need to home before being able to move the head from the screen, I can move the head from Octopi but my PC is far from the printer.

Steps to Reproduce

Cancel a print for example or do a full G29 UBL, then you cannot move the head from the screen, it says "you need to home".

Version of Marlin Firmware

2.1 bugfix 02010300

Printer model

Creality Ender 5 Plus

Electronics

Silent creality card

Add-ons

MicroSwiss direct drive

Bed Leveling

UBL Bilinear mesh

Your Slicer

Prusa Slicer

Host Software

OctoPrint

Don't forget to include

Additional information & file uploads

Marlin.zip

Bob-the-Kuhn commented 1 year ago

Are you sure you've supplied the correct configuration.h file? It has both NO_MOTION_BEFORE_HOMING and HOME_AFTER_DEACTIVATE disabled. When testing the latest bugfix-2.1.x on my SKR PRO it works just fine.

thisiskeithb commented 1 year ago

it says "you need to home"

Can you provide a photo? This text doesn't exist in Marlin or the now archived DGUS Reloaded UI.

As Bob mentioned above, you shouldn't have issues with moving things around if you have NO_MOTION_BEFORE_HOMING & HOME_AFTER_DEACTIVATE disabled.

Since DGUS Reloaded is now archived and no longer being developed, I'd recommend switching to the IA_CREALTIY variant of DGUS_LCD_UI.

Neo2003 commented 1 year ago

Sorry I was writing from memory, here is the picture IMG_2832 And yes I am sure the .h files I uploaded are the ones I used to compile. And I have both disabled //#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed. Also enable HOME_AFTER_DEACTIVATE for extra safety. //#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated. Also enable NO_MOTION_BEFORE_HOMING for extra safety.

I am not against moving to IA_CREALTIY if I can keep the DWIN_SET from DGUS-reloaded, the TinyMachine ones are awful.

ellensp commented 1 year ago

All touch screen have limitations, they have the minimal subset of feature the original developers wanted and no more.

This lcd code does not look at either of these defines

It has this code

void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) {
  const int16_t data = BE16_P(data_ptr);
  const float position = dgus_display.FromFixedPoint<int16_t, float, 1>(data);
  ExtUI::axis_t axis;

  switch (vp.addr) {
    default: return;
    case DGUS_Addr::MOVE_SetX:
      axis = ExtUI::X;
      break;
    case DGUS_Addr::MOVE_SetY:
      axis = ExtUI::Y;
      break;
    case DGUS_Addr::MOVE_SetZ:
      axis = ExtUI::Z;
      break;
  }

  if (!ExtUI::isAxisPositionKnown(axis)) {
    dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
    return;
  }

  ExtUI::setAxisPosition_mm(position, axis);

  dgus_screen_handler.TriggerFullUpdate();
}

if you change this to the following, it should do what you want

void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) {
  const int16_t data = BE16_P(data_ptr);
  const float position = dgus_display.FromFixedPoint<int16_t, float, 1>(data);
  ExtUI::axis_t axis;

  switch (vp.addr) {
    default: return;
    case DGUS_Addr::MOVE_SetX:
      axis = ExtUI::X;
      break;
    case DGUS_Addr::MOVE_SetY:
      axis = ExtUI::Y;
      break;
    case DGUS_Addr::MOVE_SetZ:
      axis = ExtUI::Z;
      break;
  }

#if ENABLED(NO_MOTION_BEFORE_HOMING)
     if (!ExtUI::isAxisPositionKnown(axis)) {
       dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED));
       return;
     }
#endif

  ExtUI::setAxisPosition_mm(position, axis);

  dgus_screen_handler.TriggerFullUpdate();
}
Neo2003 commented 1 year ago

Many thanks, I will try this change

ellensp commented 1 year ago

you cannot mix and match code and DWIN_SETS, they are a matched pair, so no you cannot use IA_CREALTIY with reloaded DWIN_SET

Neo2003 commented 1 year ago

Ok, then I will keep RELOADED then. The message blocking the moves requires a lot more #if, the one provided is not enough. I will do the required changed and report back

Neo2003 commented 1 year ago

It works now :) Here is the modified file DGUSRxHandler.zip Many thanks for your support, Marlin 2.1 is fabulous.

thisiskeithb commented 1 year ago

See https://github.com/MarlinFirmware/Marlin/commit/4b9bb85b1266e8febbcb1931c8427d410a05bf84

Neo2003 commented 1 year ago

Thanks :)

github-actions[bot] commented 1 year 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.