Thinkersbluff / DGUS-Reloaded_for_CR6-DWIN-SET_Component

Forks the Desuuuu DWIN T5UID1 touchscreen firmware, and refactors it for use on the CR6 T5L DWIN display . Must be used with the modified Klipper from https://github.com/Thinkersbluff/DGUS-Reloaded_for_CR6-Klipper_Component
GNU General Public License v3.0
22 stars 2 forks source link

Change Filament Length "limit_extrude()" function is not working #19

Closed Thinkersbluff closed 1 year ago

Thinkersbluff commented 1 year ago

I believe this function did once work, but I never change the value so I did not notice when in the evolution that it stopped working. I discovered it no longer works when I tried to add it to the Tune While Paused screen to be introduced to the DWIN component, at release 0.3.5-beta.

I had also recently upgraded my pi's Python from 3.9.2 to 3.11.1, so I started by creating a fresh install of the Mainsail 64-bit 3D Printers OS setup, which comes bundled with python 3.9.2. Sure enough, the behaviour of the system changed when running 3.9.2, but it still does not work correctly.

The design involves two Variable Pointer addresses in the DWIN display memory:

The intended functionality is that:

  1. The user taps the value on the screen, to access a popup keyboard
  2. The user types the desired new filament_length value on the keyboard. Pressing ENTER passes that value to VP 0x210d, as a 3-digit integer variable named "data".
  3. The DGUS-Reloaded Klipper Component:
    • receives that data
    • looks up the value of the printer.extruder.max_extrude_only_distance parameter specified for the current extruder in the printer.cfg file
    • passes the minimum of the value entered or the max_extrude_only_distance as the new value of the variable named filament_length
    • writes that new filament_length value back to the DGUS-Reloaded_DWIN Component, to be stored in VP 0x3125 in the DWIN display memory
      1. The user should then see the new value they entered on the keyboard appear in the filament_length variable display field on the screen.

When the system was using python 3.11.1:

Now that the same system is using python 3.9.2:

The Klippy.log entry resulting from an attempt to enter a new value of '22' is attached here: SetFilamentLength ErrorLog.txt

The Klipper Component of the code that gives the above errors is here: t5uid1_0.3.5_WIP.zip

My questions are why is the function not operating correctly & how can it be fixed?

Thinkersbluff commented 1 year ago

Many thanks to CR6Community member persano for the leg-up on this one. Turns out this problem was a self-inflicted error created when I "fixed" the name of the maximum extrude-only distance variable at release 1.2.2.

Problem now solved at 1.2.4.