My LCD display based on uc1701 has 4 pixel shift. I read about x_offset for this lcd (https://github.com/Klipper3d/klipper/pull/3284)
but when I’ve added that option I received error “Option ‘x_offset’ is not valid in section ‘display’”
Help me please.
Thank you for attention!
My display is Alfawise Ex8 custom display. It has label on plate WYH L12864 COG.
This is u1701 based LCD with a single 10-pin connector. It uses only cs_pin, a0_pin, spi_software_mosi_pin and spi_software_sclk_pin. And also encoder_pins and click_pin of course. Even spi_software_miso_pin is not used but I’ve set it to dummy value (EXP2_2).
When I tried set sh1106 i’ve received error “Option ‘dc_pin’ in section ‘display’ must be specified”. then when I’ve defined dc_pin to some value (EXP2_4) I received next error “Option ‘a0_pin’ is not valid in section ‘display’”/ After that I’ve decided that sh1106 is not compatible with u1701 and stopped experiments.
Is it possible to add x_offset section to u1701 type as that already was made according link in the starting message?
The offsetting for the SSD1306/SH1106 is needed because they have 132 segments instead of 128
Your LCD has, as its name already suggests, the standard 128 segments
→ Some offsets should not be needed
As a more general remark: Klipper is heavily focused on the displays that can be connected via Moonraker / KlipperScreen. There is only very limited interest in working on such “old” displays
Yes, of course, uc1701. My typo. I’ve checked marlin code. According macro names chip is ST7565. But it works in Klipper as type uc1701 except these 4 pixels.
x_offset shouldn’t be a problem.
May be problem in the checker which generate error for type uc1701 not in the handler itelf. Unfortunately I have not any idea where that checker can be. I play with Klipper for one week only.
If you had read my previous answer, you would have noticed that it is not implemented for this type of controller.
An interested developer would need to pick this up and implement it.
Please don’t thank me. You might hit the like knob, if there is a solution.
I guess, you were on the right path to solution.
Did you replaced your klipper/klippy/extras/display/uc1701.py?
Your printer.cfg looks good concerning the display.
The files from dmbutyugin and tntclaus are the same. When you compare those with the current official uc1701.py you’ll see the difference. Of course uncomment “#x_offset: 4” back in your printer.cfg.
Problem is fixed. Thank you both hcet14 and Sineos merge of your advices give me a solution.
In the file
klippy/extras/display/uc1701.py
I’ve replace line 170 in the class UC1701(DisplayBase):
from