Reorganize includes per ruff's preferences
This commit is contained in:
parent
47226cf246
commit
4ffb57c3d5
11 changed files with 23 additions and 12 deletions
|
|
@ -12,9 +12,10 @@ For help with commandline arguments, run `python fbmirror.py --help`
|
|||
"""
|
||||
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import click
|
||||
import numpy as np
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import adafruit_blinka_raspberry_pi5_piomatter.click as piomatter_click
|
||||
|
||||
with open("/sys/class/graphics/fb0/virtual_size") as f:
|
||||
|
|
|
|||
|
|
@ -37,10 +37,11 @@ or if `/boot/firmware/cmdline.txt` specifies a resolution such as
|
|||
`... video=HDMI-A-1:640x480M@60D`.
|
||||
"""
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import click
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import adafruit_blinka_raspberry_pi5_piomatter.click as piomatter_click
|
||||
|
||||
with open("/sys/class/graphics/fb0/virtual_size") as f:
|
||||
|
|
|
|||
|
|
@ -11,10 +11,11 @@ The animated gif is played repeatedly until interrupted with ctrl-c.
|
|||
|
||||
import time
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
width = 64
|
||||
height = 32
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@ import glob
|
|||
import sys
|
||||
import time
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
images = sorted(glob.glob(sys.argv[1]))
|
||||
|
||||
geometry = piomatter.Geometry(width=64, height=32, n_addr_lines=4, rotation=piomatter.Orientation.Normal)
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ $ python quote_scroller.py
|
|||
|
||||
"""
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import requests
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
# 128px for 2x1 matrices. Change to 64 if you're using a single matrix.
|
||||
total_width = 128
|
||||
total_height = 32
|
||||
|
|
|
|||
|
|
@ -10,11 +10,12 @@ Run like this:
|
|||
$ python rainbow_spiral.py
|
||||
|
||||
"""
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import rainbowio
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
width = 64
|
||||
height = 32
|
||||
pen_radius = 1
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@ The image is displayed until the user hits enter to exit.
|
|||
|
||||
import pathlib
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
geometry = piomatter.Geometry(width=64, height=64, n_addr_lines=4, rotation=piomatter.Orientation.Normal)
|
||||
framebuffer = np.asarray(Image.open(pathlib.Path(__file__).parent / "blinka64x64.png"))
|
||||
matrix = piomatter.PioMatter(colorspace=piomatter.Colorspace.RGB888Packed,
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@ The image is displayed until the user hits enter to exit.
|
|||
|
||||
import pathlib
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
import PIL.Image as Image
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
geometry = piomatter.Geometry(width=64, height=64, n_addr_lines=5, rotation=piomatter.Orientation.Normal, n_planes=8)
|
||||
framebuffer = np.asarray(Image.open(pathlib.Path(__file__).parent / "blinka64x64.png"))
|
||||
matrix = piomatter.PioMatter(colorspace=piomatter.Colorspace.RGB888Packed, pinout=piomatter.Pinout.AdafruitMatrixBonnetBGR, framebuffer=framebuffer, geometry=geometry)
|
||||
|
|
|
|||
|
|
@ -11,10 +11,11 @@ $ python simpletest.py
|
|||
|
||||
"""
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
width = 64
|
||||
height = 32
|
||||
|
||||
|
|
|
|||
|
|
@ -26,12 +26,13 @@ Here's an example for running an emulator using a rom stored in "/tmp/snesrom.sm
|
|||
import shlex
|
||||
from subprocess import Popen
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import click
|
||||
import numpy as np
|
||||
import adafruit_blinka_raspberry_pi5_piomatter.click as piomatter_click
|
||||
from pyvirtualdisplay.smartdisplay import SmartDisplay
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import adafruit_blinka_raspberry_pi5_piomatter.click as piomatter_click
|
||||
|
||||
|
||||
@click.command
|
||||
@click.option("--scale", type=float, help="The scale factor, larger numbers mean more virtual pixels", default=1)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@
|
|||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
import click
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
|
||||
|
||||
class PybindEnumChoice(click.Choice):
|
||||
def __init__(self, enum, case_sensitive=False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue