Mercurial > code > home > repos > homeauto
changeset 1262:a2e3a342315c
build updates. turn off output speed override for now
Ignore-this: 81c155e3c11cbad6ec28d22df255d6d5
darcs-hash:061b99e423450ef596bc3e3826c983f973f9f00d
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sat, 20 Apr 2019 23:31:16 -0700 |
parents | 1431cd58803d |
children | 82fe44eadf00 |
files | service/tinyScreen/makefile service/tinyScreen/requirements.txt service/tinyScreen/tiny_screen.py |
diffstat | 3 files changed, 19 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/service/tinyScreen/makefile Sat Apr 20 23:30:31 2019 -0700 +++ b/service/tinyScreen/makefile Sat Apr 20 23:31:16 2019 -0700 @@ -1,12 +1,13 @@ JOB=tiny_screen PORT=10013 +RUNHOST=frontdoor TAG=bang6:5000/${JOB}_x86:latest TAG_PI=bang6:5000/${JOB}_pi:latest -push_x86: +push_x86: build_x86 docker push ${TAG} -push_pi: +push_pi: build_pi docker push ${TAG_PI} build_x86: @@ -14,23 +15,24 @@ mkdir -p tmp_ctx cp -a Dockerfile ../../lib/*.py *.py *.txt *.html anim font tmp_ctx docker build --network=host -t ${TAG} tmp_ctx - rm -rf tmp_ctx - -build_image: build_x86 push_x86 build_pi: rm -rf tmp_ctx mkdir -p tmp_ctx cp -a Dockerfile.pi ../../lib/*.py *.py *.txt *.html anim font tmp_ctx docker build -f Dockerfile.pi --network=host -t ${TAG_PI} tmp_ctx - rm -rf tmp_ctx build_image_pi: build_pi push_pi -shell: - docker run --rm -it --cap-add SYS_PTRACE --net=host $(TAG) /bin/sh +shell: build_x86 + docker run --rm -it --name=$(JOB)_shell --cap-add SYS_PTRACE --net=host $(TAG) /bin/sh local_run: build_x86 - docker run --rm -it --net=host -e DISPLAY=$(DISPLAY) -e HOME=$(HOME) -v $(HOME):$(HOME) -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`/index.html:/opt/index.html bang6:5000/tiny_screen_x86:latest python ./tiny_screen.py -v -x + docker run --rm -it --net=host --name=$(JOB)_local -e DISPLAY=$(DISPLAY) -e HOME=$(HOME) -v $(HOME):$(HOME) -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`/index.html:/opt/index.html bang6:5000/tiny_screen_x86:latest python ./tiny_screen.py -v -x # try pi kernel 20181112-1 +fresh_sudo: + sudo -v +redeploy: fresh_sudo push_pi + sudo /my/proj/ansible/playbook -l $(RUNHOST) -t tiny_screen + supervisorctl -s http://$(RUNHOST):9001/ restart $(JOB)_$(PORT)
--- a/service/tinyScreen/requirements.txt Sat Apr 20 23:30:31 2019 -0700 +++ b/service/tinyScreen/requirements.txt Sat Apr 20 23:31:16 2019 -0700 @@ -1,5 +1,6 @@ luma.oled rdflib==4.2.2 cyclone -https://projects.bigasterisk.com/rdfdb/rdfdb-0.6.0.tar.gz +https://projects.bigasterisk.com/rdfdb/rdfdb-0.8.0.tar.gz rdflib-jsonld==0.3 +git+http://github.com/drewp/scales.git@448d59fb491b7631877528e7695a93553bfaaa93#egg=scales
--- a/service/tinyScreen/tiny_screen.py Sat Apr 20 23:30:31 2019 -0700 +++ b/service/tinyScreen/tiny_screen.py Sat Apr 20 23:31:16 2019 -0700 @@ -25,11 +25,14 @@ return Image.open('anim/%s.png' % state.rsplit('/')[-1]) def _initOutput(self, spiDevice, rotation): + # CS on pin 26 (GPIO7; spi0 ce1), DC on pin 18 (GPIO24), RST held at VCC. self._dev = ssd1331(spi(device=spiDevice, port=0, # lots of timeouts on the 12288-byte transfer without this - transfer_size=64, - bus_speed_hz=16000000, - gpio_RST=None), + #transfer_size=64, + #bus_speed_hz=16000000, + gpio_RST=None, + gpio_DC=24, + ), rotation=rotation) def setContrast(self, contrast):