OctoPrint-TFT icon indicating copy to clipboard operation
OctoPrint-TFT copied to clipboard

Running on 240x320 TFT

Open petriska opened this issue 6 years ago • 13 comments

Hi, thanks for nice work, Im testing version 0.1.2-1 with even smaller tft with resolution 240x320, If i I set scale OCTOPRINT_TFT_RESOLUTION to 320x240 then Icons are ok in X direction, but are very high in Y direction. Switching to 240x320 make icons right size. Second, fonts are too small (if Sdtv_mode=2, Sdtv_aspect=2 in config.txt is set) and if Sdtv parameters are not set then fonts are ok on home window, but in System submenu text is so high that back buton is outside of display and only switch off buton is displayed) Should by fine to add possibility to adjust font size. In system menu, put switch off button more on left side of window to avoid accidental pushing it during go back in menu.

petriska avatar Jan 13 '18 08:01 petriska

Can you submit some pictures?

mcuadros avatar Jan 13 '18 10:01 mcuadros

dsc09900 OCTOPRINT_TFT_RESOLUTION=240x320, sdtv_aspect=1 dsc09901 System menu OCTOPRINT_TFT_RESOLUTION=240x320, sdtv_aspect=1 dsc09902 when go back to main menu picture is changed to this dsc09903 And this is when OCTOPRINT_TFT_RESOLUTION=320x240, sdtv_aspect=1 dsc09904_320x240 but something happens I cannot go back to small fonts with sdtv_aspect=2 :(

petriska avatar Jan 13 '18 13:01 petriska

Maximo, It sometimes happens after awhile with default resolution

zen avatar Jan 13 '18 13:01 zen

Ok, now I understand, I detected this problem, with default resolution, is because the window grows to a bigger resolution forced by some components, at the default resolution is caused because some unexepected free labels.

mcuadros avatar Jan 13 '18 15:01 mcuadros

So I bought new panel with resolution 480x320 (installed as dtoverlay=piscreen, speed=16000000,rotate=90) works with xwindows anf fbdev normally. Then I set OCTOPRINT_TFT_RESOLUTION=480x320.... and same problem like with old TFT, X axis is OK, but Y scale is wrong (see picture). If I change OCTOPRINT_TFT_RESOLUTION=320x480, then Y resolution is Ok but X is wrong.

So then I commented and disabled #OCTOPRINT_TFT_RESOLUTION and finaly it works ok. So it looks like problem is in parsing config file dsc09948b

petriska avatar Feb 02 '18 16:02 petriska

Can confirm @petriska 's issue. The screen's resolution is 800x480. It seems that only the first value from the config is applied to height. If I enter 480 first in the config the height is alright. It doesnt matter what I enter second. It doesn't seem to impact.

herrwusel avatar Feb 13 '18 06:02 herrwusel

Thanks, I will try to find time to address this issue and solve it.

mcuadros avatar Feb 14 '18 20:02 mcuadros

First: I only have really little experience in go in general - keep that in mind please ;D In the main.go the lines for getting the height and width value seems equal ( https://github.com/mcuadros/OctoPrint-TFT/blob/7ce7128b89408f3bc2b8675c9ea5679a82a3eda2/main.go#L157 and https://github.com/mcuadros/OctoPrint-TFT/blob/7ce7128b89408f3bc2b8675c9ea5679a82a3eda2/main.go#L164). Might that be the culprit?

herrwusel avatar Feb 16 '18 07:02 herrwusel

Hi,

Might that be the culprit?

yep, I changed 0 to 1 at line 164 in main.go, compiled it and it is working with resolution set in configuration file (800x480 in my case).

I´m attaching compiled file, if somebody wants it and I hope @mcuadros don´t mind :) .
octoprint-tft_0.0-git7ce7128-1_armhf.zip

dronecz avatar Feb 21 '18 21:02 dronecz

Hi! I've tested package uploaded by @dronecz It solves the problem! Now it works great on my Chinese 2.8" 240x320 SPI LCD :) Thanks!

webs1821 avatar Feb 21 '18 22:02 webs1821

@dronecz Thank you. Can you make an pull request? @mcuadros just has to accept then.

EDIT: Did it myself. My first pull request ever! Whoop!

herrwusel avatar Feb 22 '18 07:02 herrwusel

Excellent! I have a 7" (800x480) display and it was stretching the display too high - will wait for an official release for Debian/Jessie.

ururk avatar Feb 26 '18 20:02 ururk

I am using the .deb file provided above and n the files menu you still have to scroll but most importantly if you click on system you won't be able to get back because it isn't scaled properly in this screen

I also have the problem that it scales differently after accessing the filament and the heatup like in the original post

DragonHunter274 avatar Oct 04 '18 17:10 DragonHunter274