~phroa/boat-map

4b956568fc7b5a7f6a1b45c7a6425aa6c2e7d22e — Jack Stratton 2 years ago df566a1
Add display script
4 files changed, 23 insertions(+), 1 deletions(-)

A .gitmodules
A display.py
A e-Paper
M make-map.py
A .gitmodules => .gitmodules +3 -0
@@ 0,0 1,3 @@
[submodule "e-Paper"]
	path = e-Paper
	url = https://github.com/waveshare/e-Paper

A display.py => display.py +18 -0
@@ 0,0 1,18 @@
#!/usr/bin/env python3
import sys

sys.path.append('e-Paper/RaspberryPi_JetsonNano/python/lib/')

from waveshare_epd import epd5in83_V2
from PIL import Image

try:
    epd = epd5in83_V2.EPD()
    epd.init()

    image = Image.open('map.bmp')
    epd.display(epd.getbuffer(image))
    epd.sleep()

except KeyboardInterrupt:
    epd5in83_V2.epdconfig.module_exit()

A e-Paper => e-Paper +1 -0
@@ 0,0 1,1 @@
Subproject commit af9694c602fb24d776cd0f0b3e073a477294e3d8

M make-map.py => make-map.py +1 -1
@@ 67,7 67,7 @@ def draw_coastlines(coastlines):
        else:
            raise

    DRAW.line([(0, MAP_HEIGHT), (WIDTH, MAP_HEIGHT)])
    DRAW.rectangle((0, 0, WIDTH - 1, MAP_HEIGHT))


def paste(src: Image, dest_x, dest_y):