Skip to content

Commit

Permalink
Merge pull request #336 from mathoudebine/fix/335-331-screen-only-par…
Browse files Browse the repository at this point in the history
…tially-drawing
  • Loading branch information
mathoudebine authored Sep 24, 2023
2 parents 199df4a + 854b094 commit 512333e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions library/lcd/lcd_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import copy
import math
import os
import queue
import sys
import threading
import time
import math
from abc import ABC, abstractmethod
from enum import IntEnum
from typing import Tuple
Expand Down Expand Up @@ -69,7 +69,6 @@ def __init__(self, com_port: str = "AUTO", display_width: int = 320, display_hei
# Create a cache to store opened fonts, to avoid opening and loading from the filesystem every time
self.font_cache = {} # { key=(font, size), value=PIL.ImageFont }


def get_width(self) -> int:
if self.orientation == Orientation.PORTRAIT or self.orientation == Orientation.REVERSE_PORTRAIT:
return self.display_width
Expand Down
1 change: 1 addition & 0 deletions library/lcd/lcd_comm_rev_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def SetBrightness(self, level: int = 25):
self.SendCommand(Command.SET_BRIGHTNESS, level_absolute, 0, 0, 0)

def SetOrientation(self, orientation: Orientation = Orientation.PORTRAIT):
self.orientation = orientation
width = self.get_width()
height = self.get_height()
x = 0
Expand Down

0 comments on commit 512333e

Please sign in to comment.