Skip to content

Linted #27

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

Merged
merged 1 commit into from
Nov 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions adafruit_ra8875/ra8875.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# imports
import time
from digitalio import Direction
import adafruit_bus_device.spi_device as spi_device
from adafruit_bus_device import spi_device
import adafruit_ra8875.registers as reg

try:
Expand Down Expand Up @@ -119,9 +119,7 @@ def init(self, start_on=True):
vsync_nondisp = 32
vsync_start = 23
vsync_pw = 2
elif self.width == 480 and (
self.height == 272 or self.height == 128 or self.height == 82
):
elif self.width == 480 and self.height in (272, 128, 82):
pixclk = reg.PCSR_PDATL | reg.PCSR_4CLK
hsync_nondisp = 10
hsync_start = 8
Expand Down Expand Up @@ -483,8 +481,7 @@ def txt_size(self, scale):
:param byte scale: The the size to scale the Text to
"""
self._txt_mode()
if scale > 3:
scale = 3
scale = min(scale, 3)
self._write_data((self._read_reg(reg.FNCR1) & ~(0xF)) | (scale << 2) | scale)
self._txt_scale = scale

Expand Down