It's been a while since I last hacked on Marlin software, probably when I built my first printer back in 2013...
I recently got a new printer (ender 3 v2) and noticed that it perpetually displays the Z offset in the display's status area. I'm used to the X,Y,Z display on the old LCD, and especially miss the current Z height.
This past weekend I pulled Marlin 2.0.7 and started digging through motion.cpp and the DWIN display code to see how it ticks.
I've created a feature called DWIN_ZPOS_DISPLAY_OVERRIDE which, when defined, writes out the current_position.z value from the motion planner, instead of the Z offset. I personally think this is more informative, but it's an option. I'll put it up in github in case others want it.
I've got two questions for others who are more familiar with the current firmware.
1) Is there documentation about the DWIN color display, regarding icons, what the rendering model is, etc? It looks like the firmware sends it drawing commands over a UART, which means the display unit has reference images to copy rectangles from for rendering.
2) The motion planner has the variable I mentioned above, current_position, which is actually the current target position. Is it correct to say that this value doesn't change say, while a motion command is being processed? I.e., that the value is "correct" at the end of the motion command?
I recently got a new printer (ender 3 v2) and noticed that it perpetually displays the Z offset in the display's status area. I'm used to the X,Y,Z display on the old LCD, and especially miss the current Z height.
This past weekend I pulled Marlin 2.0.7 and started digging through motion.cpp and the DWIN display code to see how it ticks.
I've created a feature called DWIN_ZPOS_DISPLAY_OVERRIDE which, when defined, writes out the current_position.z value from the motion planner, instead of the Z offset. I personally think this is more informative, but it's an option. I'll put it up in github in case others want it.
I've got two questions for others who are more familiar with the current firmware.
1) Is there documentation about the DWIN color display, regarding icons, what the rendering model is, etc? It looks like the firmware sends it drawing commands over a UART, which means the display unit has reference images to copy rectangles from for rendering.
2) The motion planner has the variable I mentioned above, current_position, which is actually the current target position. Is it correct to say that this value doesn't change say, while a motion command is being processed? I.e., that the value is "correct" at the end of the motion command?