Fix display sizing

This commit is contained in:
Piotr Dobrowolski 2017-09-11 21:30:37 +02:00
parent fd6f26f202
commit 82aadf6034
2 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,7 @@
become: True
become_user: root
tasks:
- synchronize: src=../.. dest=/home/pi/sejf
- copy: src=autostart dest=/home/pi/.config/lxsession/LXDE-pi/autostart
- copy: src=sejf.desktop dest=/etc/xdg/autostart
- apt: name=python-flask state=present

View File

@ -1,11 +1,17 @@
#!/usr/bin/python
import os
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.environ['SDL_VIDEO_CENTERED'] = '1'
import serial
import webapp
webapp.init(serial.Serial('/dev/ttyUSB0', 115200))
for c in ['/dev/ttyUSB0', '/dev/ttyACM0']:
try:
ser = serial.Serial(c, 115200)
except:
continue
print('Using ', c)
webapp.init(ser)
import random, math, pygame
from pygame.locals import *
@ -337,7 +343,7 @@ def main():
growsnake = 0 # added to grow tail by two each time
snakegrowunit = 2 # added to grow tail by two each time
clock = pygame.time.Clock()
screen = pygame.display.set_mode(WINSIZE)#FULLSCREEN)
screen = pygame.display.set_mode(WINSIZE, pygame.NOFRAME)#FULLSCREEN)
#screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
pygame.display.set_caption('PozySejf')
pygame.FULLSCREEN