OctoPrint-TFT
OctoPrint-TFT copied to clipboard
Running on 240x320 TFT
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.
Can you submit some pictures?
OCTOPRINT_TFT_RESOLUTION=240x320, sdtv_aspect=1
System menu OCTOPRINT_TFT_RESOLUTION=240x320, sdtv_aspect=1
when go back to main menu picture is changed to this
And this is when
OCTOPRINT_TFT_RESOLUTION=320x240, sdtv_aspect=1
but something happens I cannot go back to small fonts with sdtv_aspect=2 :(
Maximo, It sometimes happens after awhile with default resolution
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.
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
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.
Thanks, I will try to find time to address this issue and solve it.
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?
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
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!
@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!
Excellent! I have a 7" (800x480) display and it was stretching the display too high - will wait for an official release for Debian/Jessie.
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