Skip to content

Commit 512333e

Browse files
authored
Merge pull request #336 from mathoudebine/fix/335-331-screen-only-partially-drawing
2 parents 199df4a + 854b094 commit 512333e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/lcd/lcd_comm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

1919
import copy
20+
import math
2021
import os
2122
import queue
2223
import sys
2324
import threading
2425
import time
25-
import math
2626
from abc import ABC, abstractmethod
2727
from enum import IntEnum
2828
from typing import Tuple
@@ -69,7 +69,6 @@ def __init__(self, com_port: str = "AUTO", display_width: int = 320, display_hei
6969
# Create a cache to store opened fonts, to avoid opening and loading from the filesystem every time
7070
self.font_cache = {} # { key=(font, size), value=PIL.ImageFont }
7171

72-
7372
def get_width(self) -> int:
7473
if self.orientation == Orientation.PORTRAIT or self.orientation == Orientation.REVERSE_PORTRAIT:
7574
return self.display_width

library/lcd/lcd_comm_rev_a.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def SetBrightness(self, level: int = 25):
151151
self.SendCommand(Command.SET_BRIGHTNESS, level_absolute, 0, 0, 0)
152152

153153
def SetOrientation(self, orientation: Orientation = Orientation.PORTRAIT):
154+
self.orientation = orientation
154155
width = self.get_width()
155156
height = self.get_height()
156157
x = 0

0 commit comments

Comments
 (0)