Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Scaling for the Raspberry Pi 7" Touchscreen #21

Open
hoffma0901 opened this issue Mar 29, 2020 · 2 comments
Open

[Feature Request] Scaling for the Raspberry Pi 7" Touchscreen #21

hoffma0901 opened this issue Mar 29, 2020 · 2 comments

Comments

@hoffma0901
Copy link

I love the extension and I'm using it currently with the Raspberry Pi 7" touchscreen. Is it possible to scale the interface so it fits to the resolution so the whole display is used?
IMG_4040

@karoria
Copy link

karoria commented Aug 29, 2020

@hoffma0901
Sorry, I read your post now. Your display shows you have wrong zoom (around 50%) in chromium browser. In my case I use 80% zoom and it almost fits the 7" pi display.
Cheers!
Ravi

@miharix
Copy link

miharix commented Dec 6, 2023

Hi,

I did sort of fixed this little before you posted this question
master...miharix:cncjs-shopfloor-tablet:master
unfortunately I needed to put this (and other) project on long hold...

This is how mine looks now
diy_cnc_7inch_RsPi

The screen is 800x480 so to fit all on screen you need to edit pendant-shopfloor-tablet/src/css/app.css

Add to the bottom of app.css

@media screen and (max-width: 800px) {

	.btn-group-justified > .btn-group .dropdown-menu {
	  left: unset;
	}

	.dropdown-menu{
	 right: 0;
	 left: unset;
	}

	.btn{
	 padding: 6px 3px;
	}

	body{
	 overflow: hidden;
	 background-color: #000;
	 color: yellow;
	}
	
	button, input, select, textarea{
	 color: black;
	}
	
	[data-route="axes"] .pos-name{
	 color: black;
	 border-radius: 3px;
	}
	
	.col-xs-1 {
	  color: black;
	}

	[data-route="workspace"] {
	  padding: 2px;
	  font-size: 14px;
	}
	
	[data-route="axes"] > * {
	  margin-bottom: 2px;
	}

	[data-route="axes"] .axis-position .container-fluid {
	  padding-top: 5px;
	  padding-bottom: unset;
	  border-radius: 3px;
	}
	[data-route="axes"] .control-pad .container-fluid {
	  padding-top: 5px;
	  padding-bottom: unset;
	  margin-top: 7px;
	  border-radius: 3px;
	}
}

Or replace using this attached app.css
app.css.zip

As you see I did modify the look slightly to look closer the black RsPi screen border.
After change resolution bigger then 800px should stay the same as before.

The 2D visualizer is missing, I don't know why... I did clean rasspibian and then cncjs install using this script
https://github.com/cncjs/cncjs-pi-raspbian
Because following the cncjs install steps I was stuck in some dependency problems (RsPi 2 B+)

After the install the .cncjs/cncjs-kiosk.sh
was little modified to allow auto serial connect so the chromium is started using command
chromium-browser --kiosk --allow-insecure-localhost --localhost --noerrdialogs --disable-suggestions-service --disable-translate --disable-save-password-bubble --disable-session-crashed-bubble --disable-infobars --touch-events=enabled --no-touch-pinch --disable-gesture-typing http://miharix-cnc.miharix.eu/tablet
for the same adding this Cooke change was needed
cncjs/cncjs-pendant-tinyweb#6
and also to add my host (/etc/hosts) in RsPi

One more if someone is hawing headache because he needed to mount this LCD upside down:
Add
video=DSI-1:800x600M,margin_right=0,margin_left=0,margin_top=0,margin_bottom=0,rotate=180
ad end of line in /boot/cmdline.txt
and

lcd_rotate=2
display_hdmi_rotate=2

in /boot/config.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants